mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-15 04:19:28 +08:00
feat: support think time for load testing #120
This commit is contained in:
63
examples/think_time_test.json
Normal file
63
examples/think_time_test.json
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"config": {
|
||||
"name": "think time test demo",
|
||||
"variables": {
|
||||
"app_version": "v1",
|
||||
"user_agent": "iOS/10.3"
|
||||
},
|
||||
"base_url": "https://postman-echo.com",
|
||||
"think_time": {
|
||||
"strategy": "random_percentage",
|
||||
"setting": {
|
||||
"min_percentage": 1,
|
||||
"max_percentage": 1.5
|
||||
},
|
||||
"limit": 4
|
||||
},
|
||||
"verify": false
|
||||
},
|
||||
"teststeps": [
|
||||
{
|
||||
"name": "get with params",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"url": "/get",
|
||||
"headers": {
|
||||
"User-Agent": "$user_agent,$app_version"
|
||||
}
|
||||
},
|
||||
"validate": [
|
||||
{
|
||||
"check": "status_code",
|
||||
"assert": "equals",
|
||||
"expect": 200,
|
||||
"msg": "check status code"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "think time 1",
|
||||
"think_time": {
|
||||
"time": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "post with params",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"url": "/post",
|
||||
"headers": {
|
||||
"User-Agent": "$user_agent,$app_version"
|
||||
}
|
||||
},
|
||||
"validate": [
|
||||
{
|
||||
"check": "status_code",
|
||||
"assert": "equals",
|
||||
"expect": 200,
|
||||
"msg": "check status code"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user