print(data)
    b_OperateReport = b_report.OperateReport(wd=workbook, data=data)
    b_OperateReport.init(worksheet)
    b_OperateReport.detail(worksheet2)
    b_OperateReport.close()


    # b_email.send_mail(get_email())
def open_web_server():
    web_server = HTTPServer((common.HOST, common.PORT), myserver.myHandler)
    web_server.serve_forever()


if __name__ == '__main__':
    ga = get_devices()
    if adbCommon.attached_devices():
        p = Process(target=open_web_server, args=())
        p.start()

        # appium_server = server.AppiumServer(ga)
#             appium_server.start_server()
#             while not appium_server.is_runnnig():
#                 time.sleep(2)
#             runnerPool()
#             appium_server.stop_server()
#             subprocess.Popen("taskkill /F /T /PID " + str(p.pid), shell=True)
#             # web_server.server_close() #关闭webserver
#             perateFile.OperateFile(common.REPORT_COLLECT_PATH).remove_file()
#             operateFile.OperateFile(common.REPORT_INIT).remove_file()
#             operateFile.OperateFile(common.REPORT_INFO_PATH).remove_file()
#             operateFile.OperateFile(common.CRASH_LOG_PATH).remove_file()
Exemple #2
0
    workbook = xlsxwriter.Workbook('GetReport.xlsx')
    worksheet = workbook.add_worksheet("测试总况")
    worksheet2 = workbook.add_worksheet("测试详情")
    print(data)
    b_OperateReport = b_report.OperateReport(wd=workbook, data=data)
    b_OperateReport.init(worksheet)
    b_OperateReport.detail(worksheet2)
    b_OperateReport.close()
    # b_email.send_mail(get_email())
def open_web_server():
    web_server = HTTPServer((common.HOST, common.PORT), myserver.myHandler)
    web_server.serve_forever()

if __name__ == '__main__':
        ga = get_devices()
        if adbCommon.attached_devices():
            p = Process(target=open_web_server, args=())
            p.start()

            appium_server = server.AppiumServer(ga)
            appium_server.start_server()
            while not appium_server.is_runnnig():
                time.sleep(2)
            runnerPool()
            appium_server.stop_server()
            subprocess.Popen("taskkill /F /T /PID " + str(p.pid), shell=True)
            # web_server.server_close() #关闭webserver
            operateFile.OperateFile(common.REPORT_COLLECT_PATH).remove_file()
            operateFile.OperateFile(common.REPORT_INIT).remove_file()
            operateFile.OperateFile(common.REPORT_INFO_PATH).remove_file()
            operateFile.OperateFile(common.CRASH_LOG_PATH).remove_file()