Skip to content

rookieInTraining/selenium-testng-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages