Summary| Tags| Feature: features/store/CreateOrder.feature| Access to Petstore orders - Create Order
Scenario: [1:5] Place order for a pet
ms: 255
6
Given url baseURL
0
02:31:07.304 karate.env system property was: cert 02:31:07.304 Base URL system property was: https://petstore.swagger.io/v2
7
And path '/store/order'
0
8
And request
22
{ "petId": 1, "quantity": 1, "shipDate": "2025-06-28T10:00:00.000+0000", "status": "placed", "complete": true }
18
When method post
216
02:31:07.373 request: 1 > POST https://petstore.swagger.io/v2/store/order 1 > Content-Type: application/json; charset=UTF-8 1 > Content-Length: 100 1 > Host: petstore.swagger.io 1 > Connection: Keep-Alive 1 > User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.17) 1 > Accept-Encoding: gzip,deflate {"petId":1,"quantity":1,"shipDate":"2025-06-28T10:00:00.000+0000","status":"placed","complete":true} 02:31:07.543 response time in milliseconds: 169 1 < 200 1 < Date: Sun, 14 Dec 2025 02:31:07 GMT 1 < Content-Type: application/json 1 < Transfer-Encoding: chunked 1 < Connection: keep-alive 1 < Access-Control-Allow-Origin: * 1 < Access-Control-Allow-Methods: GET, POST, DELETE, PUT 1 < Access-Control-Allow-Headers: Content-Type, api_key, Authorization 1 < Server: Jetty(9.2.9.v20150224) {"id":8571504317507441384,"petId":1,"quantity":1,"shipDate":"2025-06-28T10:00:00.000+0000","status":"placed","complete":true}
19
Then status 200
0
20
* print response
1
02:31:07.545 [print] { "id": 8571504317507441384, "petId": 1, "quantity": 1, "shipDate": "2025-06-28T10:00:00.000+0000", "status": "placed", "complete": true }
21
* match response.petId == '#number? _ == 1'
10
22
* assert response.petId == Math.floor(response.petId)
1
23
* match response.quantity == '#number? _ == 1'
1
24
* match response.status == '#string? _ == "placed"'
2
25
And def orderId = response.id
1