代码拉取完成,页面将自动刷新
同步操作将从 我的未来不是梦/shizi_uiautomation 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# -*- coding: utf-8 -*-
# author:jiangsibei
import os
import pytest
from tools.AdbOperation import *
# 获取工程路径
pro_path = os.path.dirname(inspect.getfile(inspect.currentframe())) + os.path.sep
configPath = os.path.join(pro_path, 'config.ini')
mode = Config.getRunparam(configPath,"mode")
apkurl = Config.getRunparam(configPath,"apkurl")
reruns = Config.getRunparam(configPath,"reruns")
platform = Config.getRunparam(configPath,"platform")
buildNumber = Config.getRunparam(configPath,"buildNumber")
mark = Config.getRunparam(configPath,"mark")
reruns_delay = Config.getRunparam(configPath,"reruns_delay")
def Runcase(devices,reportpath,casepath,phone):
adboperarion = AdbOperation()
adboperarion.connect_device(devices)
print("链接成功",os.getpid())
if apkurl != "":
AdbOperation.InstallApp()
ReportPath = "reports/"+reportpath
cmdopt_str = "--cmdopt="+str(phone)
if mode == "2":
while not casepath.empty():
print("----",os.getpid())
filename = pro_path + 'testcase/'+casepath.get()
print("------------",filename)
pytest.main(["-sv",cmdopt_str, '--alluredir', ReportPath,filename,'--reruns=5', '--reruns-delay=3'])
elif mark != "":
mark_param = "-m="+mark
pytest.main(["-sv",cmdopt_str,mark_param, cmdopt_str,'--alluredir', ReportPath,'--reruns=5', '--reruns-delay=3',casepath])
else:
pytest.main(["-sv",cmdopt_str, '--alluredir', ReportPath,'--reruns=5', '--reruns-delay=3'])
#####该main函数方便调试单个文件
if __name__ == "__main__":
adboperarion = AdbOperation()
deviceslist = adboperarion.getdevices()
adboperarion = AdbOperation()
adboperarion.connect_device(deviceslist[0])
filename = pro_path + 'testcase/'+'test_complete_today_progress_L1_1.py'
ReportPath = "reports/"+"1"
#pytest.main(["-sv",'--alluredir', ReportPath,filename])
pytest.main([ '--alluredir', ReportPath,filename,'--reruns=5', '--reruns-delay=3'])
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。