Posted in Selenium TestNG

Creating Test Classes Using TestNG | Part 8

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

Continue Reading Creating Test Classes Using TestNG | Part 8
Re-execute Failed Test Cases
Posted in Selenium TestNG

Execute Failed Test Cases In Selenium Using TestNG

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.

Continue Reading Execute Failed Test Cases In Selenium Using TestNG
Screenshot Failed Test Case
Posted in Selenium TestNG

Take Screenshot Of Failed Test Cases Using Selenium

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.

Continue Reading Take Screenshot Of Failed Test Cases Using Selenium
Soft Assert in Selenium
Posted in TestNG

Soft Assert in Selenium | Difference between Hard and Soft Assert

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.

Continue Reading Soft Assert in Selenium | Difference between Hard and Soft Assert
TestNG Listeners in Selenium
Posted in Selenium TestNG

TestNG Listeners In Selenium

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.).

Continue Reading TestNG Listeners In Selenium
Groups TestNG
Posted in Selenium TestNG

Groups in TestNG and How to use them

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

Continue Reading Groups in TestNG and How to use them
TestNG in Selenium
Posted in Selenium TestNG

What is TestNG and How to use TestNG in Selenium | TestNG Selenium Tutorial

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…

Continue Reading What is TestNG and How to use TestNG in Selenium | TestNG Selenium Tutorial