Esempio n. 1
0
 def run_dependent_case(self):
     run_method = RunMethod()
     row_Num = self.oper_excel.get_row_num_by_caseId(self.caseId)
     url = self.get_data.get_url_data(row_Num)
     method = self.get_data.get_method_data(row_Num)
     header = self.get_data.get_header_data(row_Num)
     request_data = self.get_data.get_data_for_json(row_Num)
     response_data = run_method.run_main(method, url, request_data, header)
     return json.loads(response_data)
Esempio n. 2
0
    def __init__(self, methodName='runTest'):
        super(RunTest, self).__init__(methodName)

        # 获取logger和run_log
        read_logger = ReadLogger()
        self.logger = read_logger.get_logger()
        self.run_log_src = read_logger.get_run_log()

        # 使用自封装requests
        self.run_method = RunMethod()

        # 使用自封装关联数据
        self.rely_data = RelyData()

        self.case_id = ''  # 用例id
        self.desc = ''  # 用例描述
        self.req_msg = {'request': {}, '\nresponse': {}}  # 用例基本信息
Esempio n. 3
0
 def __init__(self):
     self.run_method = RunMethod()
     self.get_data = GetData()
     self.common_util = CommonUtil()
Esempio n. 4
0
 def __init__(self):
     self.run_method = RunMethod()
     self.data = GetData()
     self.common_util = CommonUtil()
     self.send_email = SendEmail()