mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 07:26:55 +08:00
fix #96: add skip feature
1, skip=True is equal to times=0; 2, skip priority is higher than times.
This commit is contained in:
@@ -1 +1 @@
|
|||||||
__version__ = '0.8.8'
|
__version__ = '0.8.9'
|
||||||
@@ -71,6 +71,7 @@ class Runner(object):
|
|||||||
@param (dict) testcase_dict
|
@param (dict) testcase_dict
|
||||||
{
|
{
|
||||||
"name": "testcase description",
|
"name": "testcase description",
|
||||||
|
"skip": Fasle,
|
||||||
"times": 3,
|
"times": 3,
|
||||||
"requires": [], # optional, override
|
"requires": [], # optional, override
|
||||||
"function_binds": {}, # optional, override
|
"function_binds": {}, # optional, override
|
||||||
@@ -101,7 +102,12 @@ class Runner(object):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
raise exception.ParamsError("URL or METHOD missed!")
|
raise exception.ParamsError("URL or METHOD missed!")
|
||||||
|
|
||||||
run_times = int(testcase_dict.get("times", 1))
|
skip_current_test = testcase_dict.get("skip", False)
|
||||||
|
if skip_current_test:
|
||||||
|
run_times = 0
|
||||||
|
else:
|
||||||
|
run_times = int(testcase_dict.get("times", 1))
|
||||||
|
|
||||||
extractors = testcase_dict.get("extract", [])
|
extractors = testcase_dict.get("extract", [])
|
||||||
validators = testcase_dict.get("validate", [])
|
validators = testcase_dict.get("validate", [])
|
||||||
setup_actions = testcase_dict.get("setup", [])
|
setup_actions = testcase_dict.get("setup", [])
|
||||||
|
|||||||
Reference in New Issue
Block a user