Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

How can we run a Test method multiple times in a loop(without using any data provider)?

Category: TestNG

Using invocationCount parameter and setting its value to an integer value, makes the test method to run n number of times in a loop.
@Test(invocationCount = 10)
public void invocationCountTest(){
//Test logic
}

Leave a Reply

Your email address will not be published. Required fields are marked *