通过搜集网络上已有的解决方案以及自己研究airtest底层的代码,整理出适合大致的批量执行Airtest脚本的解决方法。
效果图如下:
代码目录结构:
执行结果图:
点击案例名称调整至详细报告:
解决方案:
在Python3.6环境下新建myRunner.py文件:编写如下代码
from airtest.cli.runner import AirtestCase, run_script
from argparse import *
import airtest.report.report as report
import jinja2
import shutil
import os
import io
class CustomAirtestCase(AirtestCase):
def setUp(self):
print("custom setup")
# add var/function/class/.. to globals
# se