This is the Java version of boilerplate code for UI test framework using Selenium and TestNG, which contains support for the following.
- Chrome and Firefox browser
- Screenshot taking upon failure
- TestNG report and stacktrace logging
- Test execution on Selenium Grid, Browserstack, Sauce Labs
- Parallel test execution
Framework can be extended according to your needs. Other versions:
- Husky - Javascript ES6 with WebdriverJS (Selenium)
- Clone this repo
git clone https://github.com/dhtlee/labrador.git
- Import project to your IDE of choice
- Download latest drivers (Note: drivers will be downloaded to <project_root_dir>/drivers)
mvn clean compile -P download-drivers
- Create a local copy of config.properties from config-template.properties in src/main/resources
- Update driver path and other configuration values in config.properties where needed
- Execute demo TestNG regression test suite: Note: There will be 1 test that passes and 1 that fails
mvn clean test -DsuiteXmlFile=regression.xml
- To view test report, open target/surefire-reports/index.html in a browser, navigate to 'Reporter Output'
- Update thread-count value in the test suites xml
Labrador is released under the MIT License.