mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-09 22:44:05 +08:00
feat: testsuite in format version 2
This commit is contained in:
29
tests/testsuites/create_users.json
Normal file
29
tests/testsuites/create_users.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"testcases": {
|
||||
"create user 1001 and check result.": {
|
||||
"testcase": "testcases/create_user.yml",
|
||||
"variables": {
|
||||
"var_d": "$var_c",
|
||||
"var_c": "${gen_random_string(5)}",
|
||||
"uid": 1001
|
||||
}
|
||||
},
|
||||
"create user 1000 and check result.": {
|
||||
"testcase": "testcases/create_user.yml",
|
||||
"variables": {
|
||||
"var_d": "$var_c",
|
||||
"var_c": "${gen_random_string(5)}",
|
||||
"uid": 1000
|
||||
}
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"variables": {
|
||||
"device_sn": "${gen_random_string(15)}",
|
||||
"var_b": "$var_a",
|
||||
"var_a": "${gen_random_string(5)}"
|
||||
},
|
||||
"name": "create users with uid",
|
||||
"base_url": "http://127.0.0.1:5000"
|
||||
}
|
||||
}
|
||||
31
tests/testsuites/create_users.v2.json
Normal file
31
tests/testsuites/create_users.v2.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"config": {
|
||||
"variables": {
|
||||
"device_sn": "${gen_random_string(15)}",
|
||||
"var_b": "$var_a",
|
||||
"var_a": "${gen_random_string(5)}"
|
||||
},
|
||||
"name": "create users with uid",
|
||||
"base_url": "http://127.0.0.1:5000"
|
||||
},
|
||||
"testcases": [
|
||||
{
|
||||
"name": "create user 1000 and check result.",
|
||||
"testcase": "testcases/create_user.yml",
|
||||
"variables": {
|
||||
"var_d": "$var_c",
|
||||
"var_c": "${gen_random_string(5)}",
|
||||
"uid": 1000
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "create user 1001 and check result.",
|
||||
"testcase": "testcases/create_user.yml",
|
||||
"variables": {
|
||||
"var_d": "$var_c",
|
||||
"var_c": "${gen_random_string(5)}",
|
||||
"uid": 1001
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
24
tests/testsuites/create_users.v2.yml
Normal file
24
tests/testsuites/create_users.v2.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
config:
|
||||
name: create users with uid
|
||||
variables:
|
||||
device_sn: ${gen_random_string(15)}
|
||||
var_a: ${gen_random_string(5)}
|
||||
var_b: $var_a
|
||||
base_url: "http://127.0.0.1:5000"
|
||||
|
||||
testcases:
|
||||
-
|
||||
name: create user 1000 and check result.
|
||||
testcase: testcases/create_user.yml
|
||||
variables:
|
||||
uid: 1000
|
||||
var_c: ${gen_random_string(5)}
|
||||
var_d: $var_c
|
||||
|
||||
-
|
||||
name: create user 1001 and check result.
|
||||
testcase: testcases/create_user.yml
|
||||
variables:
|
||||
uid: 1001
|
||||
var_c: ${gen_random_string(5)}
|
||||
var_d: $var_c
|
||||
Reference in New Issue
Block a user