File tree 2 files changed +6
-3
lines changed
src/test/java/Chapters/Chapter01
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -20,5 +20,8 @@ task runTests(type: Test) {
20
20
useTestNG {
21
21
useDefaultListeners = true
22
22
}
23
+ testLogging {
24
+ events ' passed' , ' skipped' , ' failed'
25
+ }
23
26
}
24
27
Original file line number Diff line number Diff line change 10
10
11
11
public class FirstChapterTests {
12
12
13
- private static final String BASE_URL = "http ://petstore.swagger.io/v2" ;
13
+ private static final String BASE_URL = "https ://petstore.swagger.io/v2" ;
14
14
15
15
// In this test, we are going to test a GET API and validate the Response
16
16
@ Test
@@ -22,7 +22,7 @@ public void sendAGETRequestAndValidateResponse() {
22
22
.then ()
23
23
.statusCode (200 ) // It verify the actual response code with the given code
24
24
.body ("[0].id" , notNullValue ()) // Checking whether value is Not_Null or not
25
- .body ("[0].category. name" , notNullValue ())
25
+ .body ("[0].name" , notNullValue ())
26
26
.body ("[0].status" , equalTo ("sold" )); // Checking status is equal to "sold"
27
27
}
28
28
@@ -35,7 +35,7 @@ public void sendAGETRequestByPassingQueryParameterInURL() {
35
35
.then ()
36
36
.statusCode (200 )
37
37
.body ("[0].id" , notNullValue ())
38
- .body ("[0].category. name" , notNullValue ())
38
+ .body ("[0].name" , notNullValue ())
39
39
.body ("[0].status" , equalTo ("sold" ));
40
40
}
41
41
You can’t perform that action at this time.
0 commit comments