So far we have been using a single test class (LoginPageTest.java) with main method to execute all the tests. Now, we will break that class into different classes containing separate tests
It happens occasionally that a test which was working fine earlier gets failed during execution. If you execute it again, it would get pass. To overcome this issue TestNG provides a listener which would retry to execute failed test cases for a given number of times.
Screenshots play a vital role in testing. These can be used as evidence for functionality under test, raising a defect or for asking a query etc. During automation, regression suite is usually executed in a remote machine or during off-hours.
We have been using the hard assert in our previous tutorials. Assert.fail() is such an example of hard assert which we have used in THIS post. In this tutorial, we will learn what is a soft assert in selenium and how it is different than hard assert.
There are several interfaces provided by TestNG which could alter the behavior of TestNG implementation. TestNG Listeners are invoked on the occurrence of certain events (for eg. failure of scripts, execution completion of test suite etc.).
In this tutorial, we will learn to execute multiple test cases in a group. Groups in TestNG are a collection of test scripts which we want to execute
What is TestNG TestNG Features TestNG is a Testing framework which helps in effective execution of automated test cases. TestNG in selenium could be understood…