Untitled
unknown
plain_text
3 years ago
682 B
12
Indexable
@Test
public void test2() {
given().
when().
get("https://reqres.in/api/users/2").
then().
log().body().
assertThat().body("data.'first_name'", equalTo("Janet"));
}
@Test
public void test3() {
Response response =
given().
when().
get("https://reqres.in/api/users/2").
then().
log().body().
extract().response();
JsonPath jsonPath = response.jsonPath();
System.out.println(response.body());
assertThat(jsonPath.get("data.first_name"), equalTo("Janet"));Editor is loading...