Ma classe test est celle-là :
/**
* The Class TestAddSubscriber.
*/
@RunWith(LabelledParameterized.class)
public class TestAddSubscriber extends AbstractTestSubscriber {
/**
* Instantiates a new test add subscriber.
*
* @param label
* the label
* @param apiKey
* the api key
* @param userKey
* the user key
* @param customerId
* the customer id
*/
public TestAddSubscriber(String label, String apiKey, String userKey,
int customerId) {
super(label, apiKey, userKey, customerId);
}
/**
* @see com.contactlab.api.test.AbstractTest#setUp()
*/
@Override
@Before
public void setUp() throws Exception {
super.setUp();
}
/**
* @see com.contactlab.api.test.AbstractTest#tearDown()
*/
@Override
@After
public void tearDown() throws Exception {
super.tearDown();
}
/**
* Generated data.
*
* @return the collection
*/
@Parameters
public static Collection<Object[]> generatedData() {
return DataProvider.generatedCorrectSubscriberData();
}
/**
* Test add subscriber with internal pk id case sensitive.
*
* @outcome: success
* @expected: success
* @obtained: success
*/
@Test
public void testAddSubscriberWithInternalPkIdCaseSensitive() {
/** this is the test **/
}
/**
* other tests
**/
}
Si j'exécute la suite de tests, je n'ai pas de problème, mais si je mets en évidence un seul d'entre eux et que je l'exécute, j'ai un problème. Unrooted Tests -> InitializationError
La classe utilise Parameterized
.
L'exception est :
TestAddSubscriber.testAddSubscriberWithInternalPkIdCaseSensitive
Unrooted Tests
initializationError(org.junit.runner.manipulation.Filter)
java.lang.Exception: No tests found matching Method testAddSubscriberWithInternalPkIdCaseSensitive(com.contactlab.api.test.subscriber.TestAddSubscriber) from org.junit.internal.requests.ClassRequest@18872380
at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:37)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestMethodReference.<init>(JUnit4TestMethodReference.java:25)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:54)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Y a-t-il quelque chose que je fais mal ?