pytest + yaml 框架 -10.allure 生成报告

前言

本插件是基于pytest框架开发的,所以pytest 的插件都能使用,生成报告可以用到 allure 报告
pip 安装插件

pip install pytest-yaml-yoyo

allure 报告功能在 v1.0.8 版本上实现

allure 命令行工具

allure 是一个命令行工具,需要去github上下载最新版https://github.com/allure-framework/allure2/releases

allure 命令行工具是需要依赖jdk 环境,环境内容自己去搭建了

生成 allure 报告

在用例所在的目录执行命令, --alluredir 是指定报告生成的目录

pytest --alluredir ./report

打开allure 报告执行命令

>allure serve ./report

查看报告

首页显示

图表查看

用例详情根据yaml文件名称和用例名称展示内容


网易云完整视频课程https://study.163.com/course/courseMain.htm?courseId=1213419817&share=2&shareId=480000002230338
报名咨询wx:283340479 (已报名的同学学习过程中有问题,都可以协助解决)

posted @ 2022-12-09 09:04  上海-悠悠  阅读(520)  评论(0编辑  收藏  举报