donatelo
donatelo

Reputation: 103

TestNG with DataProvider skips all tests

I have a simple class with just one test and this test uses 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

Upvotes: 0

Views: 2743

Answers (1)

donatelo
donatelo

Reputation: 103

My TestNG version was 6.9.12 and Idea 2016.2.2. When I updated TestNG to 6.9.13 it started to work. Thank you all for sugestions!

Upvotes: 2

Related Questions