-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfast-performance-test.hit
More file actions
72 lines (60 loc) · 1.69 KB
/
fast-performance-test.hit
File metadata and controls
72 lines (60 loc) · 1.69 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
# Fast Performance Testing Example
# Optimized for speed with fewer, more efficient requests
#
# This example demonstrates:
# - Optimized request selection for faster execution
# - Efficient use of cached endpoints
# - Minimal payload sizes
# - Essential assertions only
#
# Usage:
# hitman examples/fast-performance-test.hit
# hitman examples/fast-performance-test.hit --parallel
# ===== CONFIGURATION =====
DEFINE jsonPlaceholderBase="https://jsonplaceholder.typicode.com"
DEFINE httpbinBase="https://httpbin.org"
# ===== FAST REQUESTS ONLY =====
# Test 1: Single post (fast, cached)
GET {{jsonPlaceholderBase}}/posts/1 AS singlePost
# Test 2: User info (fast, cached)
GET {{jsonPlaceholderBase}}/users/1 AS userInfo
# Test 3: Simple GET with params
GET {{httpbinBase}}/get
WITH QUERY {
"test": "fast"
}
AS httpbinGet
# Test 4: Simple POST
POST {{httpbinBase}}/post
WITH HEADER {
"Content-Type": "application/json"
}
WITH DATA {
"message": "Fast test"
}
AS httpbinPost
# Test 5: Status code test
GET {{httpbinBase}}/status/200 AS status200
# Test 6: JSON response
GET {{httpbinBase}}/json AS jsonResponse
# Test 7: Headers test
GET {{httpbinBase}}/headers
WITH HEADER {
"X-Test": "fast"
}
AS headersTest
# Test 8: Basic auth
GET {{httpbinBase}}/basic-auth/user/passwd
WITH HEADER {
"Authorization": "Basic dXNlcjpwYXNzd2Q="
}
AS basicAuth
# ===== ASSERTIONS =====
ASSERT singlePost.status == 200
ASSERT userInfo.status == 200
ASSERT httpbinGet.status == 200
ASSERT httpbinPost.status == 200
ASSERT status200.status == 200
ASSERT jsonResponse.status == 200
ASSERT headersTest.status == 200
ASSERT basicAuth.status == 200