我只有一个测试的简单类,此测试使用DataProvider
public class dataProviderExample {
@DataProvider(name = "test1")
public Object[][] createData1() {
return new Object[][] {
{ "Cedric", new Integer(36) },
{ "Anne", new Integer(37)},
};
}
@Test(dataProvider = "test1")
public void verifyData1(String n1, Integer n2) {
System.out.println(n1 + " " + n2);
}
}
当我运行它时,所有测试都被滑雪了。知道我做错了什么吗?
[TestNG] Running:
C:\Users\user\.IdeaIC2016.2\system\temp-testng-customsuite.xml
Test ignored.
Test ignored.
===============================================
Default Suite
Total tests run: 1, Failures: 0, Skips: 1
===============================================
Process finished with exit code 0
答案 0 :(得分:1)
我的TestNG版本是6.9.12和Idea 2016.2.2。当我将TestNG更新到6.9.13时,它开始工作。谢谢大家的消遣!