You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem using testNGs DataProviders, when one of the test sets is failing.
Here is my type of scenario:
@Test(groups = {"login"}, dataProvider = "loginTest")
public void error_cases_login(String user, String password, String errorMessage) {
given().user_$_with_password_$(user, password) ;
when().he_tries_to_login();
then().he_sees_error_message(errorMessage).
and().he_did_not_login() ;
}
@DataProvider(name = "loginTest")
public static Object[][] createLogins() {
return new Object[][]{
{"mgehlen", "12345678", "password too short (min. 8 characters"},
{"mgehl3n", "12345678", "user unknown"},
};
}
The first test fails since the password is actually long enough, the test skips the "and he did not log in" step, which is completely fine.
But now the second test with the second data set ist also skipped. In my point of view a faulty data set should not lead to ending the whole test case. Or should it?
Thank you very much,
mgehlen
The text was updated successfully, but these errors were encountered:
Hello,
I have a problem using testNGs DataProviders, when one of the test sets is failing.
Here is my type of scenario:
The first test fails since the password is actually long enough, the test skips the "and he did not log in" step, which is completely fine.
But now the second test with the second data set ist also skipped. In my point of view a faulty data set should not lead to ending the whole test case. Or should it?
Thank you very much,
mgehlen
The text was updated successfully, but these errors were encountered: