pytest结合allure-pytest插件生成测试报告
创始人
2025-02-10 19:04:28
0

目录

一、安装allure-pytest插件

二、下载allure

三、生成allure报告

四、效果展示


一、安装allure-pytest插件

二、下载allure

下载之后解压,解压之后还要配置环境变量(把allure目录下bin目录配置到系统变量的path路径),下载地址:https://github.com/allure-framework/allure2/releases

验证allure是否安装成功:allure --version

1)先在dos窗口验证

2)在pycharm中验证(如果这里失败了,那么需要重启pycharm)

三、生成allure报告

1)生成临时的json报告,在pytest.ini文件里面加入一下内容:

addopts = -vs --alluredir=./temps --clean-alluredir

--alluredir=./temps 生成临时报告

--clean-alluredir 清空临时报告

2)生成正式的allure报告

if __name__ == '__main__':     pytest.main()     time.sleep(3)     os.system("allure generate ./temps -o ./reports --clean")

四、效果展示

相关内容

热门资讯

透视脚本!aapoker怎么提... 透视脚本!aapoker怎么提高中牌率,aapoker辅助软件合法吗,技巧教程(有挂黑科技);小薇(...
透视规律!aapoker透视插... 透视规律!aapoker透视插件,aapoker辅助软件合法吗,微扑克教程(有挂插件)1、玩家可以在...
透视ai代打!aapoker透... 透视ai代打!aapoker透视插件,aapoker真的假的,揭秘教程(有挂规律)小薇(透视辅助)致...
透视科技!aapoker俱乐部... 透视科技!aapoker俱乐部靠谱吗,aapoker发牌逻辑,科技教程(有挂教程)1、实时aapok...
透视最新!aapoker怎么开... 透视最新!aapoker怎么开辅助器,aapoker能控制牌吗,AA德州教程(有挂攻略)1、不需要A...
透视工具!aapoker怎么选... 透视工具!aapoker怎么选牌,aapoker万能辅助器,教你教程(有挂教程)aapoker万能辅...
透视规律!aapoker插件,... 透视规律!aapoker插件,aapoker辅助插件工具,科技教程(有挂方法)1、上手简单,内置详细...
透视神器!aapoker辅助器... 透视神器!aapoker辅助器怎么用,aapoker怎么提高中牌率,教你攻略(有挂辅助)1、打开软件...
透视黑科技!aapoker能控... 透视黑科技!aapoker能控制牌吗,aa poker透视软件,黑科技教程(有挂揭秘)1、每一步都需...
透视ai!aapoker辅助器... 透视ai!aapoker辅助器是真的吗,aapoker真的假的,力荐教程(有挂教程)1、不需要AI权...