HttpRunner 2.0 is comming!

1, new design for testcase format;
2, refactor testcase layer mechanism.
This commit is contained in:
debugtalk
2018-11-22 19:20:30 +08:00
parent 82b527d8b2
commit 4099ade49d
31 changed files with 1500 additions and 1303 deletions

View File

@@ -12,12 +12,34 @@ class TestValidator(unittest.TestCase):
self.assertFalse(validator.is_testcases(data_structure))
data_structure = {
"name": "desc1",
"config": {},
"api": {},
"testcases": ["testcase11", "testcase12"]
"project_mapping": {
"PWD": "XXXXX",
"functions": {},
"env": {}
},
"testcases": [
{ # testcase data structure
"config": {
"name": "desc1",
"path": "testcase1_path",
"variables": [], # optional
},
"teststeps": [
# teststep data structure
{
'name': 'test step desc1',
'variables': [], # optional
'extract': [], # optional
'validate': [],
'request': {}
},
# teststep2 # another teststep dict
]
},
# testcase_dict_2 # another testcase dict
]
}
self.assertTrue(data_structure)
self.assertTrue(validator.is_testcases(data_structure))
data_structure = [
{
"name": "desc1",