Problem:
When I run a TestNG test using a DataProvider
providing a large number of test cases, the Eclipse view for TestNG is not appropriately updated. It stops updating at a random point, and the progress bar indicates that the tests are still running. However, the console shows that all tests have been terminated.
For the MCVE below, I used Eclipse 2019-03 and TestNG 6.14.3, but I'm facing this problem since several years, with different Eclipse versions, different TestNG versions, and on different machines.
MCVE:
import static org.testng.Assert.assertEquals;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
public class TestNgTest {
@DataProvider(name="data")
public final Object[][] getTestData() {
Object[][] data = new Integer[1000][];
for (int i=0; i<1000; i++) {
data[i] = new Integer[]{i, i};
}
return data;
}
@Test(dataProvider="data")
public void test(int actual, int expected) {
assertEquals(actual, expected);
}
}
Console Output of MCVE:
[RemoteTestNG] detected TestNG version 6.14.3
PASSED: test(0, 0)
PASSED: test(1, 1)
PASSED: test(2, 2)
[...........]
PASSED: test(997, 997)
PASSED: test(998, 998)
PASSED: test(999, 999)
===============================================
Default test
Tests run: 1000, Failures: 0, Skips: 0
===============================================
===============================================
Default suite
Total tests run: 1000, Failures: 0, Skips: 0
===============================================
Output in TestNG-View:
Anyone facing the same problem? Any ideas how to solve this?