run_test: add doc string

This commit is contained in:
httprunner
2017-06-27 14:16:26 +08:00
parent de218878d7
commit fde4901724

View File

@@ -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]
}, },