mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-11 10:49:43 +08:00
run_test: add doc string
This commit is contained in:
@@ -57,6 +57,15 @@ class TestRunner(object):
|
|||||||
|
|
||||||
def run_test(self, testcase):
|
def run_test(self, testcase):
|
||||||
""" run single testcase.
|
""" run single testcase.
|
||||||
|
@testcase
|
||||||
|
{
|
||||||
|
"name": "testcase description",
|
||||||
|
"requires": [], # optional, override
|
||||||
|
"function_binds": {}, # optional, override
|
||||||
|
"variable_binds": {}, # optional, override
|
||||||
|
"request": {},
|
||||||
|
"response": {}
|
||||||
|
}
|
||||||
"""
|
"""
|
||||||
testcase = self.parse_testcase(testcase)
|
testcase = self.parse_testcase(testcase)
|
||||||
|
|
||||||
@@ -78,6 +87,7 @@ class TestRunner(object):
|
|||||||
@testsets
|
@testsets
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
"name": "testset description",
|
||||||
"config": {
|
"config": {
|
||||||
"requires": [],
|
"requires": [],
|
||||||
"function_binds": {},
|
"function_binds": {},
|
||||||
@@ -85,6 +95,7 @@ class TestRunner(object):
|
|||||||
},
|
},
|
||||||
"testcases": [
|
"testcases": [
|
||||||
{
|
{
|
||||||
|
"name": "testcase description",
|
||||||
"variable_binds": {}, # override
|
"variable_binds": {}, # override
|
||||||
"request": {},
|
"request": {},
|
||||||
"response": {}
|
"response": {}
|
||||||
@@ -93,6 +104,7 @@ class TestRunner(object):
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"name": "XXX",
|
||||||
"config": {},
|
"config": {},
|
||||||
"testcases": [testcase21, testcase22, testcase23]
|
"testcases": [testcase21, testcase22, testcase23]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user