Quantcast
Channel: Selenium Easy - TestNG Tutorials
Browsing all 11 articles
Browse latest View live

Passing data to DataProvider from Excel sheet

In this example we will see how to pass the data to Dataproviders by reading the data from excel sheet. DataProvider helps to send multiple sets of data to a test method. But here we need to make sure...

View Article



Optional annotation in TestNG

As we know, we can pass parameter values to the test methods during run time from testng xml file by specifying Parameters annotation to test method. To do this, we need to declare parameters tag in...

View Article

Image may be NSFW.
Clik here to view.

Customize TestNG html Report

Please visit for the updated article customized emailable report along with screenshots which works perfect for newer versions of testNG and tested with testng latest version 6.14.3 UPDATED : This...

View Article

Image may be NSFW.
Clik here to view.

Execute Testng.xml from command line

We can execute testng.xml file in different ways. 1. Eclipse 2. InteliJ 3. Ant / Maven 4. Command Line 5. Batch File. In IDE you can just right click on testng.xml file and click on Run as 'TestNG'...

View Article

Image may be NSFW.
Clik here to view.

Execute Testng.xml using batch file

In previous tutorial we have seen executing testng.xml tests from command line. Now here we will look into executing testng.xml using batch file (.bat) file. A batch file (.bat) is used in DOS and...

View Article


Image may be NSFW.
Clik here to view.

IMethodInterceptor examples to reorder list of test methods

IMethodInterceptor is used to alter/modify the list of test methods to be executed by TestNG. When we implement IMethodInterceptor interface which has just one method to implement...

View Article

Image may be NSFW.
Clik here to view.

Customize TestNG emailable report with screenshots

As we know, TestNG provides default html reports with basic information like No. of tests passed, failed, skipped and time taken to execute these tests in milliseconds. But you may not find it very...

View Article

Image may be NSFW.
Clik here to view.

SoftAssert in TestNG example

SoftAssert in TestNG helps to collect all the assertions throughout the @Test method. And to see assertions result at the end of the test, we have to invoke assertAll(). SoftAssert don't throw an...

View Article


Image may be NSFW.
Clik here to view.

Allure report example using testng and maven

Allure is an open-source framework designed to create interactive and comprehensive test report by Yandex QA Team Each time when we run automation tests, we will have test results to view details about...

View Article


Image may be NSFW.
Clik here to view.

TestNG - Gradle example

Gradle is an open-source build automation tool that is designed to be flexible enough to build almost any type of software. Gradle runs on the JVM and you must have a Java Development Kit (JDK)...

View Article

Test Report with Retry Stacktrace and Screenshot

Earlier we have seen ways to rerun the TestNG tests when there are failures due to many exceptions such as 'NoSuchElementException', 'NoSuchWindowException''TimeOutException',...

View Article
Browsing all 11 articles
Browse latest View live




Latest Images