mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-30 12:59:39 +08:00
88 lines
2.6 KiB
JSON
88 lines
2.6 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
"description": "httprunner testsuite schema v2 definition",
|
|
"type": "object",
|
|
"definitions": {
|
|
"testcase": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"$ref": "common.schema.json#/definitions/name"
|
|
},
|
|
"variables": {
|
|
"$ref": "common.schema.json#/definitions/variables"
|
|
},
|
|
"parameters": {
|
|
"description": "generate cartesian product variables with parameters, each group of variables will be run once",
|
|
"type": "object"
|
|
},
|
|
"testcase": {
|
|
"description": "testcase reference, value is testcase file relative path",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"testcase"
|
|
]
|
|
}
|
|
},
|
|
"properties": {
|
|
"config": {
|
|
"$ref": "common.schema.json#/definitions/config"
|
|
},
|
|
"testcases": {
|
|
"description": "testcase of a testsuite",
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"$ref": "testsuite.schema.v2.json#/definitions/testcase"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"config",
|
|
"testcases"
|
|
],
|
|
"examples": [
|
|
{
|
|
"config": {
|
|
"name": "testsuite name"
|
|
},
|
|
"testcases": [
|
|
{
|
|
"name": "testcase 1",
|
|
"testcase": "/path/to/testcase1"
|
|
},
|
|
{
|
|
"name": "testcase 2",
|
|
"testcase": "/path/to/testcase2"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"config": {
|
|
"name": "demo testsuite",
|
|
"variables": {
|
|
"device_sn": "XYZ"
|
|
},
|
|
"base_url": "http://127.0.0.1:5000"
|
|
},
|
|
"testcases": [
|
|
{
|
|
"name": "call demo_testcase with data 1",
|
|
"testcase": "path/to/demo_testcase.yml",
|
|
"variables": {
|
|
"device_sn": "$device_sn"
|
|
}
|
|
},
|
|
{
|
|
"name": "call demo_testcase with data 2",
|
|
"testcase": "path/to/demo_testcase.yml",
|
|
"variables": {
|
|
"device_sn": "$device_sn"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |