I'm having this errors for all of my test cases. Please, help to find out what's wrong? I'm new to testing, so sorry if it's a silly question.
java.lang.AssertionError: 1 expectation failed. Expected status code <200> doesn't match actual status code <301>.
@Test (priority=1)
public static void authSuccess(){
String id = "xxxxxxxxxx";
given().
param("id",id).
when().
post("/auth").
then().
statusCode(200).
body("content.id", equalTo(id));
}
@Test (priority=2)
public static void authFail(){
String id = "xxxxxxxxxx";
given().
param("id", id).
when().
post("/auth").
then().
statusCode(400).
body("errors[0]", equalTo("Incorrect ID"));
}
/aut/index.hmlor something like that, as 301 MOVED PERMANENTLY indicates a redirection because of the path. Manually calling the URL one can request the page info. - Joop Eggen