[英]TestNG with DataProvider skips all tests
I have a simple class with just one test and this test uses DataProvider
我有一个只有一个测试的简单类,该测试使用
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);
}
}
When I run it then all tests are skiped. 当我运行它时,将跳过所有测试。 Any idea what am I doing wrong?
知道我在做什么错吗?
[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
My TestNG version was 6.9.12 and Idea 2016.2.2. 我的TestNG版本是6.9.12和Idea 2016.2.2。 When I updated TestNG to 6.9.13 it started to work.
当我将TestNG更新到6.9.13时,它开始工作。 Thank you all for sugestions!
谢谢大家的问候!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.