I have a test market with @Test annotaion. But when I run the test case, it shows me that Tests run: 0, Failures: 0, Skips: 0 I am running test cases from within eclipse. I have testng plugin installed in eclipse.
TestClass Code:
public class ModelledEventBus {
ModelledEventBusOperator dummyOperator = new ModelledEventBusOperator();
/**
* Dummy Test Case to show the interworkings of TAF classes
*/
@VUsers(vusers = { 1, 10, 100 })
@Test(dataProvider = "dummyTestData", dataProviderClass = ModelledEventBusTestDataProvider.class)
public void dummyTestCase(String stringToPrint) {
setTestcase("TC-DUMMY", "Dummy Test Case");
setTestInfo("Testing " + stringToPrint);
assertEquals(dummyOperator.operate(stringToPrint),
dummyOperator.expected());
}
}
attributes inside @Test are custom.
public class ModelledEventBusTestDataProvider {
// Dummy Test Data Provider Code generated to show interworkings of TAF Classes
@DataProvider(name="dymmyTestData")
public static String[][] dummyTestData(){
String[][] result = {{"First String"},{"Second String"}};
return result;
}
}
TestNG version:6.8.0