So, I thought the following code would work fine in TestNG, although this is not the case:
public class Tests { int i = 0; @Test public void testA() { Assert.assertEquals(0, i); ++i; } @Test public void testB() { Assert.assertEquals(0, i); ++i; } }
Is there a way to get TestNG to run a new Tests class for each test method?
source share