Esempio n. 1
0
 def __init__(self, excelfilename):
     self.excelfilename = excelfilename
     fc = FileChecKController()
     boolean = fc.is_has_file(excelfilename)
     if boolean:
         self.excel_path = fc.get_fileabspath()
     self.log4py = LoggingController()
Esempio n. 2
0
 def __init__(self):
     self.fkctl = FileChecKController()
     if self.fkctl.is_has_file("allpath.ini"):
         fp = self.fkctl.get_fileabspath()
     self.cfgctl = ConfigController(fp)
     self.log4py = LoggingController()
     self.pro_path = self.fkctl.get_project_path()
Esempio n. 3
0
 def __init__(self):
     self.log4py = LoggingController()
     path_obj = GetAllPathController()
     self.appium_log_path = path_obj.get_appium_logs_path()
     self.appium_port_list = []
     self.bootstrap_port_list = []
     self.device_list = []
     self.cfg = CreateConfigFile()
     self.tmp = {}
Esempio n. 4
0
 def __init__(self, driver):
     self.android = AdbCmder()
     self.log4py = LoggingController()
     self.driver = driver
     self.taction = TouchAction(self.driver)
     self.path_get = GetAllPathController()
     self.actions = []
     self.xml_file_path = self.path_get.get_dumpxml_path()
     self.pattern = re.compile(r"\d+")
     self.capturePath = self.path_get.get_capture_path()
Esempio n. 5
0
 def __init__(self):
     self.fc = FileChecKController()
     bools = self.fc.is_has_file("email.ini")
     if bools:
         fp = self.fc.get_fileabspath()
         conf = ConfigController(fp)
         self.smtp_host = conf.get("emails", "smtp_host")
         self.pop3_host = conf.get("emails", "pop3_host")
         self.receiver = conf.get("emails", "receiver").split(",")
         self.receiver_pa = conf.get("emails", "receiver_pa")
         self.sender = conf.get("emails", "sender")
         self.sender_pa = conf.get("emails", "sender_pa")
     self.log4py = LoggingController()
Esempio n. 6
0
 def __init__(self):
     self.logger = LoggingController()
     self.fc = FileChecKController()
     boolean = self.fc.is_has_file("db.ini")
     if boolean:
         self.inipath = self.fc.get_fileabspath()
     self.conf = ConfigController(self.inipath)
     self.host = str(self.conf.get("dbset", "host"))
     self.port = int(self.conf.get("dbset", "port"))
     self.user = str(self.conf.get("dbset", "user"))
     self.passwd = str(self.conf.get("dbset", "passwd"))
     self.db = str(self.conf.get("dbset", "db"))
     self.charset = str(self.conf.get("dbset", "charset"))
     self.conn = mysqldb.Connect(self.host, self.user, self.passwd, self.db,
                                 self.port, self.charset)
     self.logger.debug("数据库初始化完成" + self.host + str(self.port) + self.db +
                       self.charset)
def html_reporter():
    logger = LoggingController()
    fc = FileChecKController()
    pro_path = fc.getProjectPath()
    boolean = fc.is_has_file("framework.ini")
    if boolean:
        inipath = fc.get_fileabspath()
        fw_conf = ConfigController(inipath)
    htmlrp_path = fw_conf.get("htmlreportPath", "htmlreportPath")
    htmreportl_abs_path = os.path.join(pro_path,htmlrp_path)
    timecurrent = DateTimeManager().formatedTime("%Y-%m-%d-%H-%M-%S")
    logger.debug("=====创建了一个html文件报告,路径是::"+htmreportl_abs_path)
    file_path = str(htmreportl_abs_path)+timecurrent+"-LDP-TestingRreporter.html"
    try:
        if os.path.exists(file_path):
            html_obj = open(file_path, "a") #打开文件   追加
            return html_obj
        else:
            html_obj = file(file_path, "wb+")
            return html_obj
    except Exception, e:
        logger.error("创建html_reporter出现错误"+str(e))
 def __init__(self):
     self.cfg = ConfigParser.ConfigParser()
     self.log4py = LoggingController()
     self.path = (os.getcwd()).split('src')[0] + "\\testconfig"
Esempio n. 9
0
 def __init__(self):
     self.__fileabspath = None  #不可访问的
     self.__logger = LoggingController()
Esempio n. 10
0
 def __init__(self):
     self.log4py = LoggingController()
Esempio n. 11
0
 def __init__(self):
     self.log4py = LoggingController()
     self.run_cfg = InitConfiger()
     self.android = AdbCmder()
     self.run_data = None
Esempio n. 12
0
 def __init__(self):
     self.android = AdbCmder()
     self.log4py = LoggingController()
Esempio n. 13
0
 def __init__(self):
     self.json_obj = None
     self.fc = FileChecKController()
     if self.fc.is_has_file("android_devices_info.json"):
         self.json_file_path = self.fc.get_fileabspath()
     self.log4py = LoggingController()