TestNG: How can I run same test case multiple times?

You cannot do it from the xml, but in the @Test annotation – you can add a invocationCount attribute with the number of times you want to run it. It would come out as those many tests run in the report.

eg.

@Test(invocationCount = 10)
public void testCount() {..}

You have missed closing curly bracket at the end, so a small correction.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)