Scenario: [1:6]
Retrieve players list
ms: 1514
>>
Background:
4
* url baseUrl
0
06:19:42.807 karate.env selected environment was: null
7
* def playerToAdd = karate.read('classpath:json/new-player.json')
50
8
Given path '/api/v1/players'
1
9
And request playerToAdd
1
10
When method POST
1456
06:19:43.065 request:
1 > POST https://spring-boot-asynchronous-api.fly.dev/api/v1/players
1 > Content-Type: application/json
1 > Content-Length: 83
1 > Host: spring-boot-asynchronous-api.fly.dev
1 > Connection: Keep-Alive
1 > User-Agent: Apache-HttpClient/4.5.14 (Java/21.0.2)
1 > Accept-Encoding: gzip,deflate
{"id":1,"name":"Youssef Msakni","age":32,"club":"Tunisia","nationality":"Tunisian"}
06:19:44.355 response time in milliseconds: 1290
1 < 500
1 < content-type: application/json
1 < transfer-encoding: chunked
1 < date: Tue, 26 Mar 2024 06:19:44 GMT
1 < connection: close
1 < server: Fly/0052f39f (2024-03-18)
1 < via: 1.1 fly.io
1 < fly-request-id: 01HSWPM9BQPTHSKWWQPPWF04GC-iad
{"timestamp":"2024-03-26T06:19:44.279+00:00","status":500,"error":"Internal Server Error","path":"/api/v1/players"}
11
Then status 200
6
06:19:44.364 classpath:features/player/add_player.feature:11
Then status 200
status code was: 500, expected: 200, response time in milliseconds: 1290, url: https://spring-boot-asynchronous-api.fly.dev/api/v1/players, response:
{"timestamp":"2024-03-26T06:19:44.279+00:00","status":500,"error":"Internal Server Error","path":"/api/v1/players"}
classpath:features/player/add_player.feature:11
12
And match $ contains { id: "#notnull" }
0