showing results for - "how to vverify time in response body"
Paola
16 May 2019
1 Response time is the amount of time
2 a system takes to react to a request
3 when they received one.
4Basically this is Remote Response time.
5 
6If file not under resources: 
7File schemaFile = new File("src/test/resources/postSuccessResponseSchema.json");
8
9     given()
10        .spec(adminReqSpec)
11        .contentType(ContentType.JSON)
12        .body(abcUtil.getRandomHeroPOJO_Payload()).
13     when()
14        .post("/HEROS").
15     then()
16        .body(matchesJsonSchema( schemaFile )  ) 
17        
18        
19If schema file under resources:
20  given()
21      .spec(adminReqSpec)
22      .queryParam("nameContains","a")
23      .queryParam("gender","Female").
24  when()
25      .get("/abc/search").
26 then()
27 	  .time( lessThan(2000L));	
28      .body(matchesJsonSchemaInClasspath("searchSpartanSchema.json") )