Esempio n. 1
0
 def wrapper(*args, **kwargs):
     func_name = getattr(func, '__name__')  #获取用例函数名称
     #判断yaml文件路径是否存在
     if os.path.exists(file_path) is False:
         raise CaseFileNotFound
     request_obj = Send2Reques(file_path, func_name, rep_value)
     response, except_dict = request_obj.run_case  #执行用例,获得resopnse
     if except_dict:
         AssertActions(except_dict, response).exec_assert()  #断言
     return func(*args, **kwargs)
Esempio n. 2
0
 def teardown_class(self):
     request_obj = Send2Reques(
         '/Users/xiongting/Desktop/工作/DRCC/DRCCTEST/testdata/assetdb/asset_id2815_test.yaml'
     )
     request_obj.tear_down_case
Esempio n. 3
0
 def setup_class(self):
     request_obj = Send2Reques(
         '/Users/xiongting/Desktop/工作/DRCC/DRCCTEST/testdata/assetdb/db2817_test.yaml'
     )
     request_obj.ini_case
Esempio n. 4
0
 def setup_class(self):
     request_obj = Send2Reques(
         '/Users/xiongting/Desktop/工作/DRCC/DRCCTEST/testdata/assetgroups/group_id2875_test.yaml'
     )
     request_obj.ini_case