Beispiel #1
0
 def __init__(self):
     super().__init__()
     # dependyaml文件与sql执行结果yaml文件
     self.yamlKey = OperationYaml('dependKeyInfo.yaml')
     self.yamlsqlExecute = OperationYaml('sqlExecuteInfo.yaml')
     self.opera_excle = OperationExcle()
     # 创建实例对象dependkey与dependFiled与yaml配置里面的key
     self.dependKey = ''
     self.dependField = ''
     self.dependKeyYaml = ''
     self.sqlExecuteResult = ''
     # '''定义header类型'''
     self.No_auth_headerFlag = self.yaml['No_auth_headerFlag']  #无需token认证
     self.crm_headerFlag = self.yaml['crm_headerFlag']  # crm
     self.fwh_headerFlag = self.yaml['fwh_headerFlag']  # 服务号微信端
     self.fwh_admin_headerFlag = self.yaml['fwh_admin_headerFlag']  # 服务号后台
     # 定义content_type
     self.content_type_json = self.yaml['content_type_json']
     self.content_type_form_urlencoded = self.yaml[
         'content_type_form_urlencoded']
     self.content_type_text = self.yaml['content_type_text']
     self.content_type_form_data = self.yaml['content_type_form_data']
     self.content_type_form_data_boundary = self.yaml[
         'content_type_form_data_boundary']
     self.content_type_xml = self.yaml['content_type_xml']
     #存放sql
     self.sql = None
     self.writelist = []
Beispiel #2
0
 def __init__(self, case_id):
     super().__init__()
     # 实例依赖字段yaml文件
     self.yamlField = OperationYaml('dependFieldInfo.yaml')
     # 数据依赖字段实例
     self.dependFieldYaml = ''
     self.case_id = case_id
     self.data = GetData()
     self.depend_key_dict = {}  #存放依赖key数据
 def __init__(self, path, file_path):
     super().__init__()
     self.send_mail = SendEmail()  #邮件发送
     self.gld_mongo = Mongo_gld()
     self.gldexp_mongo = Mongo_gldexp()
     self.gld_mysql = Mysql_gld()
     self.gldexp_mysql = Mysql_gldexp()
     # 默认读取config,此文件只读不写
     self.yaml = OperationYaml(path=path, file_path=file_path)
Beispiel #4
0
 def __init__(self):
     self.requestDataDispose = operationRequestData()  #请求数据处理
     self.mylog = MyLog.get_log()  #日志
     self.log = self.mylog.get_logger()  #获取日志创建对象
     self.run_method = RunMethod()  #通过请求封装
     self.com_assert = CommonAssert()  #通用预期与实际结果判断
     self.send_mail = SendEmail()  #邮件发送
     self.json = OperationJson()
     # 默认读取config,此文件只读不写
     self.yaml = OperationYaml().readDataForKey('config')
 def __init__(self):
     config = OperationYaml().read_data()
     self.dataBaseConfig = config['config']
Beispiel #6
0
 def setup(self):
     yaml = OperationYaml(file_path='devices_caps_ApiDemos.yaml')
     caps = yaml.readforKey_onetier('caps')
     self.driver = webdriver.Remote("http://localhost:4723/wd/hub", caps)
     self.driver.implicitly_wait(10)  # 添加隐式等待
 def __init__(self):
     Config = OperationYaml().read_data()
     self.config = Config['config']
Beispiel #8
0
def get_data(file_path='Commands.yaml'):
    yaml = OperationYaml(file_path=file_path)
    commands = yaml.read_data()
    return commands
 def __init__(self):
     config = OperationYaml(file_path='Config.yaml').read_data()
     self.dataBaseConfig = config['config']
Beispiel #10
0
 def __init__(self):
     config = OperationYaml().read_data()
     self.fwhConfig = config['config']
     self.log = logs()