This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have test code as below. test1 passes the test and test2 failed when I expect both to fail. But when I run the test in command line, both tests failed. I'm using netbeans 7.1 @Test(dataProvider="prov") public void test1(int x, int y){ System.out.println("x=" + x + ", y=" + y); assertEquals(x + y, 3); } @Test(dataProvider="prov") public void test2(int x, int y){ System.out.println("x=" + x + ", y=" + y); assertEquals(x + y, 7); } @DataProvider public Object[][] prov(){ return new Object[][]{ {1,2}, {3,4} }; }
actually there are 4 tests: test1(1,2) test1(3,4) test2(1,2) test2(3,4) where test1(3,4) and test2(1,2) will fail and test1(1,2) and test2(3,4) will pass, so IDE should report 2 passes and 2 failures which is consistent with what TestNG itself reports: =============================================== Ant suite Total tests run: 4, Failures: 2, Skips: 0 =============================================== => invalid
Created attachment 115481 [details] test1 is erroneously marked as passed