I have a negative test that takes in dataset with different values. Eg: null, empty string, invalid strings, etc. If i user @Parameter annotation provided by allure, it throws Null pointer Exception
Here's the snippet of my test case and dataset
@Test(groups = TestGroups.Group1, dataProvider = "getInvalidCredentials")
public void testInvalidLogin(@Parameter("username") String username,
@Parameter("password") String password) {
//do something with username and password
}
}
@DataProvider(name = "getInvalidCredentials")
private Object[][] getInvalidCredentials() {
return new Object[][] {
{null, null},
{"username", null}
};
}
Below is the stacktrace:
java.lang.NullPointerException at ru.yandex.qatools.allure.testng.AllureTestListener.fireAddParameterEvents(AllureTestListener.java:390)
at ru.yandex.qatools.allure.testng.AllureTestListener.onTestStart(AllureTestListener.java:143)
at org.testng.internal.Invoker.runTestListeners(Invoker.java:1700)
at org.testng.internal.Invoker.runTestListeners(Invoker.java:1675)
Hi,
I have a negative test that takes in dataset with different values. Eg: null, empty string, invalid strings, etc. If i user @Parameter annotation provided by allure, it throws Null pointer Exception Here's the snippet of my test case and dataset
Below is the stacktrace: