Integrate Circle CI

Tạo tài khoản Github
Install git bash
setup git
Github Action is support run your code on circle CI free, blow is config:

Change open browser to headless mode

Last updated
Was this helpful?

Tạo tài khoản Github
Install git bash
setup git
Github Action is support run your code on circle CI free, blow is config:

Change open browser to headless mode

Last updated
Was this helpful?
Was this helpful?
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Run Selenium Test
run: mvn test -Dtestplan=todoTestPlan.xml
- name: Publish Test Report
uses: scacap/action-surefire-report@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/surefire-reports/ublic static void launch(String name) {
if (name.equalsIgnoreCase("chrome")) {
WebDriverManager.chromedriver().setup();
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.setHeadless(true);
driver = new ChromeDriver(chromeOptions);
} else if (name.equalsIgnoreCase("firefox")) {
WebDriverManager.firefoxdriver().setup();
driver = new FirefoxDriver();
} else if (name.equalsIgnoreCase("ie")) {
WebDriverManager.iedriver().setup();
driver = new InternetExplorerDriver();
}
mouse = new Actions(getDriver());
wait = new WebDriverWait(getDriver(), 30);
}