-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.mig
56 lines (47 loc) · 1.29 KB
/
example.mig
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
# Custom MIG File Example
# Each test case starts with a 'TestCase' keyword followed by relevant details.
TestCase: Example Test Case 1
Description: Test case for verifying the GET endpoint of the Example API
Author: John Doe
Method: GET
URL: https://google.com/
StatusCode: 400
# Headers
Headers:
Content-Type: application/json
Authorization: Bearer example_token
Custom-Header: CustomValue
# Payload (only for POST, PUT, PATCH methods)
Payload:
key1: value1
key2: value2
# Assertions
Assertions:
JSONPathExists: $.data.items
JSONPathValue: $.data.items[0].id == 123
JSONPathValue: $.data.items[0].name == "Example Item"
HeaderExists: Content-Type
HeaderValue: Content-Type == application/json
---
TestCase: Example Test Case 2
Description: Test case for verifying another GET endpoint
Author: John Doe
Method: GET
URL: https://example.com/
StatusCode: 200
# Headers
Headers:
Content-Type: application/json
Authorization: Bearer example_token
Custom-Header: CustomValue
# Payload (only for POST, PUT, PATCH methods)
Payload:
key1: value1
key2: value2
# Assertions
Assertions:
JSONPathExists: $.data.items
JSONPathValue: $.data.items[0].id == 456
JSONPathValue: $.data.items[0].name == "Another Item"
HeaderExists: Content-Type
HeaderValue: Content-Type == application/json