Category "testng"

How to run TestNG test several times with BeforeTest execution?

I try to execute the test several times with DataProvider. All works fine, but @BeforeTest and @AfterTest execute only one time, but I need this execution with

How to run TestNG test several times with BeforeTest execution?

I try to execute the test several times with DataProvider. All works fine, but @BeforeTest and @AfterTest execute only one time, but I need this execution with

Executing Same Jenkins job by picking fail_skip xml once first execution is over

I am from QA automation and pretty new to jenkins, below is my case Process: I have a jenkins job which picks up a file criticalsuite.xml (testng) and triggers

How to run testng xml using gradle?

I am trying to run testng.xml using gradle task but looks like its not picking it. Can someone please help me in identifying what I am missing here? Do I need t

TestNg - How to merge two dataproviders horizontally

Can you please let me know if we can merge the below 2 dataproviders public Object[][] dp1() { User user = new User(1L, "Arun"); Transaction trx = new Tr

Could not find or load main class org.testng.remote.RemoteTestNG - in Eclipse

I've tried to update Selenium webdriver version and now i cant run my tests because of following exception: Error: Could not find or load main class org.t

Taking screenshots for Allure reports from custom TestNG listener - TestListenerAdapter

I'm implementing custom test listener called TestListenerAdapter in my project and I wrote the code to capture screenshot in onTestFailure method of listener cl

TestNG Cannot find class in classpath once a new scala class is added to the suite.xml file

Seems like this is a very "popular" question on SO with no definitive way to fix it but I'm asking the question anyway because I can provide some more details.

How to Run as a TestNG test file

When I right-click the class file and choose "Run As" TestNG isn't an option. I've added the TestNG jars by adding the dependency in the pom.xml and running as

How to exclude class in TestNG [duplicate]

I have a test suite called Test.XML. If I want to exclude any one class, how can I do that? Here is the Test.XML: <?xml version="1.0" encod

How to use OR condition with TestNG assertions

Is there a way to do assertions with OR with TestNG? This is what I am trying to find: assertEquals(expected, value1 || value2); // Can be any number of valu