Compatible with Major Latest Selenium Release - 3
Screen Shot gets created automatically on failure with the name of the test.
A Failed Test case re-runs without altering test case count.
This was implemented using Test-NG Listeners to handle rare UI failures.
1. Selenium 3.11.0
2. LOG4J 2.11.0
3. TestNG 6.14.3
4. Gradle
-
src/test/resources/testNG.xml
-- All Environment related data goes here includingurl
,browser
,browser version
&targetRun
targetRun
- can belocal or browserStack
, browser version is ignored iftargetRun=local
-
src/main/java/com/company/project/utilities/SeleniumUtil.java
-- Has Utility functions that can be used in Selenium tests including Selenium Web Driver Creation. -
src/main/java/com/company/project/pages
-- All Web Pages Business logic goes here. -
src/test/java/com/company/project/tests
-- All Tests go here, will have function calls to the page methods and will have assertions accordingly.
NOTE : ALL OTHER ENVIRONMENT RELATED DETAILS SHOULD BE IN TESTNG XML's so that tests can run in any environment without any code changes
`TESTS --> TESTNG XML --> GRADLE TASK --> CI`