I have list strings with some urls:
localhost:80/my/first/url
,localhost:80/my/second/url
there can be 2, 5 or more urls. I must check which adres respond me with error 500.
@Test() //bad test
public void checkErrorStatusForURLs() {
for(String url : urlList()) {
given().when().get(url)
.then().statusCode(CoreMatchers.not(500));
}
}
I dont want write tests for each url. Can i do it on one test? How to do it correctly?