Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 1.1 KB

File metadata and controls

29 lines (20 loc) · 1.1 KB

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