implement method to get variables and output

This commit is contained in:
debugtalk
2019-03-01 10:28:12 +08:00
parent 1ecd1eddd6
commit 972c878d19
4 changed files with 95 additions and 2 deletions

View File

@@ -194,6 +194,35 @@ class HttpRunner(object):
return report_path
def get_vars_out(self):
""" get variables and output
Returns:
list: list of variables and output.
if tests are parameterized, list items are corresponded to parameters.
[
{
"in": {
"user1": "leo"
},
"out": {
"out1": "out_value_1"
}
},
{...}
]
None: returns None if tests not started or finished or corrupted.
"""
if not self._summary:
return None
return [
summary["in_out"]
for summary in self._summary["details"]
]
def run_path(self, path, dot_env_path=None, mapping=None):
""" run testcase/testsuite file or folder.