mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 11:29:48 +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
|
||||
{
|
||||
"name": "testcase description",
|
||||
"skip": Fasle,
|
||||
"times": 3,
|
||||
"requires": [], # optional, override
|
||||
"function_binds": {}, # optional, override
|
||||
@@ -101,7 +102,12 @@ class Runner(object):
|
||||
except KeyError:
|
||||
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", [])
|
||||
validators = testcase_dict.get("validate", [])
|
||||
setup_actions = testcase_dict.get("setup", [])
|
||||
|
||||
Reference in New Issue
Block a user