Template on Maven + Selenium + Cucumber + Allure Reports written in Java. Webdriver creation is thread safe and parallel execution is working by simply providing maven parameter, ie. '-Dthreads=5'
- -Dbrowser {chrome, firefox...}
- -Dheadless {true(default), false}
- -DremoteDriver {default false and then it runs in local environment}
- -DgridURL {i.e. -DgridURL=https://username:Ws2yz7oTgSKxo5jzjUC4@hub-cloud.browserstack.com/wd/hub}
- -DdesiredBrowserVersion
- -DdesiredPlatform
- -Dthreads {$number_of_tests_in_parallel}
- -Dsurefire.runFailingTestsCount=2 (retries failed test for 2 times before marking it a failure)
- Running Allure reports (if installed, or plugin added to jenkins) with command
allure:serve
at the end of Maven execution command
mvn clean test -Dheadless=false -Dbrowser=CHROME -Dthreads=1 allure:serve
- mvn clean test -Dbrowser=CHROME -DremoteDriver=true -DgridURL=https://${username}:${automate_key}@hub-cloud .browserstack.com/wd/hub