-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhttp OrderFlow.Core.http
More file actions
108 lines (77 loc) · 2.56 KB
/
http OrderFlow.Core.http
File metadata and controls
108 lines (77 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
@OrderFlow.Core_HostAddress = https://localhost:32771
### 1. Create Order
POST {{OrderFlow.Core_HostAddress}}/api/orders
Content-Type: application/json
{
"customerName": "John Doe",
"productName": "Laptop",
"quantity": 2,
"totalAmount": 2499.99
}
###
### 2. Create Another Order (for testing different scenarios)
POST {{OrderFlow.Core_HostAddress}}/api/orders
Content-Type: application/json
{
"customerName": "Jane Smith",
"productName": "Wireless Mouse",
"quantity": 5,
"totalAmount": 149.95
}
###
### 3. Verify Payment (replace with actual OrderId from Create Order response)
# @name createOrderForPayment
POST {{OrderFlow.Core_HostAddress}}/api/orders
Content-Type: application/json
{
"customerName": "Alice Johnson",
"productName": "Keyboard",
"quantity": 1,
"totalAmount": 89.99
}
###
### 4. Verify Payment for Order
POST {{OrderFlow.Core_HostAddress}}/api/orders/{{orderId}}/payment
Content-Type: application/json
# Replace {{orderId}} with actual GUID from Create Order response
# Example: POST {{OrderFlow.Core_HostAddress}}/api/orders/a1b2c3d4-e5f6-7890-abcd-ef1234567890/payment
###
### 5. Ship Order
POST {{OrderFlow.Core_HostAddress}}/api/orders/{{orderId}}/ship
Content-Type: application/json
# Replace {{orderId}} with actual GUID from Create Order response
# Example: POST {{OrderFlow.Core_HostAddress}}/api/orders/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ship
###
### 6. Deliver Order
POST {{OrderFlow.Core_HostAddress}}/api/orders/{{orderId}}/deliver
Content-Type: application/json
# Replace {{orderId}} with actual GUID from Create Order response
# Example: POST {{OrderFlow.Core_HostAddress}}/api/orders/a1b2c3d4-e5f6-7890-abcd-ef1234567890/deliver
###
### 7. Cancel Order
DELETE {{OrderFlow.Core_HostAddress}}/api/orders/{{orderId}}
Content-Type: application/json
# Replace {{orderId}} with actual GUID from Create Order response
# Example: DELETE {{OrderFlow.Core_HostAddress}}/api/orders/a1b2c3d4-e5f6-7890-abcd-ef1234567890
###
### Complete Order Flow Test Sequence
# Step 1: Create Order
# @name orderFlowTest
POST {{OrderFlow.Core_HostAddress}}/api/orders
Content-Type: application/json
{
"customerName": "Bob Wilson",
"productName": "Monitor",
"quantity": 1,
"totalAmount": 399.99
}
###
# Step 2: Verify Payment (use OrderId from previous response)
# POST {{OrderFlow.Core_HostAddress}}/api/orders/{OrderId}/payment
###
# Step 3: Ship Order (use same OrderId)
# POST {{OrderFlow.Core_HostAddress}}/api/orders/{OrderId}/ship
###
# Step 4: Deliver Order (use same OrderId)
# POST {{OrderFlow.Core_HostAddress}}/api/orders/{OrderId}/deliver
###