mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-25 02:10:24 +08:00
129 lines
4.8 KiB
JSON
129 lines
4.8 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
"description": "httprunner testcase schema v2 definition",
|
|
"type": "object",
|
|
"definitions": {
|
|
"teststep": {
|
|
"type": "object",
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"name": {
|
|
"$ref": "common.schema.json#/definitions/name"
|
|
},
|
|
"request": {
|
|
"description": "define api request directly",
|
|
"$ref": "common.schema.json#/definitions/request"
|
|
},
|
|
"variables": {
|
|
"$ref": "common.schema.json#/definitions/variables"
|
|
},
|
|
"extract": {
|
|
"$ref": "common.schema.json#/definitions/extract"
|
|
},
|
|
"validate": {
|
|
"$ref": "common.schema.json#/definitions/validate"
|
|
},
|
|
"setup_hooks": {
|
|
"$ref": "common.schema.json#/definitions/hook"
|
|
},
|
|
"teardown_hooks": {
|
|
"$ref": "common.schema.json#/definitions/hook"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"request"
|
|
]
|
|
},
|
|
{
|
|
"properties": {
|
|
"name": {
|
|
"$ref": "common.schema.json#/definitions/name"
|
|
},
|
|
"api": {
|
|
"description": "api reference, value is api file relative path",
|
|
"type": "string"
|
|
},
|
|
"variables": {
|
|
"$ref": "common.schema.json#/definitions/variables"
|
|
},
|
|
"extract": {
|
|
"oneOf": [
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"$ref": "common.schema.json#/definitions/extract"
|
|
}
|
|
]
|
|
},
|
|
"validate": {
|
|
"$ref": "common.schema.json#/definitions/validate"
|
|
},
|
|
"setup_hooks": {
|
|
"$ref": "common.schema.json#/definitions/hook"
|
|
},
|
|
"teardown_hooks": {
|
|
"$ref": "common.schema.json#/definitions/hook"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"api"
|
|
]
|
|
},
|
|
{
|
|
"properties": {
|
|
"name": {
|
|
"$ref": "common.schema.json#/definitions/name"
|
|
},
|
|
"testcase": {
|
|
"description": "testcase reference, value is testcase file relative path",
|
|
"type": "string"
|
|
},
|
|
"variables": {
|
|
"$ref": "common.schema.json#/definitions/variables"
|
|
},
|
|
"extract": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"setup_hooks": {
|
|
"$ref": "common.schema.json#/definitions/hook"
|
|
},
|
|
"teardown_hooks": {
|
|
"$ref": "common.schema.json#/definitions/hook"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"testcase"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"properties": {
|
|
"config": {
|
|
"$ref": "common.schema.json#/definitions/config"
|
|
},
|
|
"teststeps": {
|
|
"description": "teststep of a testcase",
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"$ref": "testcase.schema.v2.json#/definitions/teststep"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"config",
|
|
"teststeps"
|
|
]
|
|
} |