0

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
f-CJ
  • 4,235
  • 2
  • 30
  • 28
donatelo
  • 103
  • 2
  • 12
  • What is your testng version? Try with a recent one: 6.9.10+. You can set a higher verbose level in order to understand why the test is skipping too. – juherr Sep 21 '16 at 11:24
  • It shows: '[Invoker 1018547642] No configuration methods found'. I still tells me nothing :( – donatelo Sep 22 '16 at 10:25
  • Could you try with ` @Test(dataProvider = "createData1")` ? – juherr Sep 22 '16 at 10:52
  • What is your testng version ? – juherr Sep 22 '16 at 10:53
  • In fact, your example in working as expected with recent TestNG (6.9.14-SNAPSHOT) and latest Idea2016.3 EAP. – juherr Sep 22 '16 at 11:29
  • I have the same when using `@Test(dataProvider = "createData1")`. My TestNG version is 6.9.12 and Idea 2016.2.2. I have changes TestNG to 6.9.13 and it works. Is this feature not avaliable in previous versions? – donatelo Sep 22 '16 at 11:36
  • It is working well with TestNG 6.9.12. Maybe you can try to upgrade Idea to 2016.2.4 – juherr Sep 22 '16 at 11:51

1 Answers1

2

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!

donatelo
  • 103
  • 2
  • 12