Running testng suites in maven project

testng maven

In pom.xml remove the junit dependency and add testng dependency instead. In this example we are usi ... Read More

Custom Listeners in testng using ITestListener

custom listener testng

Other than TestListenerAdapter we can even implement an interace named ITestListener for our class n ... Read More

Providing data parallely to testng testcases

parallel execution testng

When we use dataprovider to provide data to our test cases ,it provides data to test case serially ... Read More

Set priorities and depends on methods in testng

priorities testng

We can set priority to a test and also define upon which test ,this test dependes upon as below. ... Read More

Running testng tests in batch

xml file testng

We can run mutiple testng suites by adding them to a suite.xml file like this ``` <suite name=" ... Read More

Soft and hard assertions in Testng

soft hard assertions testng

In a testing method if we add some assert statement like this ``` @Test public void regClass( ... Read More

Data providers in testng

data providers testng

We can provide a data provider to any of our tests in testng like this ``` @Test(dataProvider=" ... Read More

Custom Listeners in testng using iReporter

custom listener testng

We can make our custom reports using ireporter listener.Ireporter is an interface. We have to ... Read More

Testng annotations

testng annotations

We write a simplt test in testng using @Test annotation ``` @Test public void printmsg(){ Syst ... Read More

Skip or fail a test in testng

skip fail testng

To skip a test in testng we use skip exception ``` @Test public void testA1(){ throw new SkipE ... Read More