An open API service indexing awesome lists of open source software.

https://github.com/rookieintraining/selenium-testng-boilerplate


https://github.com/rookieintraining/selenium-testng-boilerplate

automation-testng automation-ui gradle selenium testng webdriver

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# Selenium with TestNG Boilerplate

Boilerplate code for writing your java based selenium tests using testNG.

# Notes
- The framework spawns the browsers (max. of 10) in the test
- The framework re-uses the browsers spawned for the remainder of the tests

# How to run the tests
Use the simple gradle syntax to run the test :

```
gradle clean test
```

Apart from the above, there are few env variables that can be used while executing the tests :

| |Purpose |Default Value |
|----------------|-------------------------------|-----------------------------|
|selectedBrowser |Uses the value provided by the users to run the tests |chrome |
|headless |Runs the tests in the browser's headless mode |false |
|runOnGrid |Executes test on the grid if set to true else runs it on local|false |

Hence, in order to run the test on the grid for Firefox in headless mode we can use the below command :

```
gradle clean test -DselectedBrowser=Firefox -Dheadless=true -DrunOnGrid=true
```