当前位置:网站首页>Allure of pytest visual test report
Allure of pytest visual test report
2022-07-04 19:32:00 【Wu_ Candy】
Pytest Report generation
- Generate compatible Junit Style report Junit style xml The report :pytest—junitxml=path
- Generate HTML Style report Pytest-html The report :pytest—html=report.html Allure2 The report pytest—alluredir=/tmp/my_allure_results
This article mainly explains how to use Allure To generate beautiful test reports .
The steps are as follows :
Step1、 install Allure
Use command :pip install allure-pytest
Step2、 download Allure edition
https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.zip
After decompression , take allure/bin Directory added to environment variable path in .
Windows System Add environment variables as shown in the figure below :
Mac System Add environment variables as shown in the figure below :
Add the above screenshot Allure Of bin Add the path where the directory is located to the environment variable
Get into terminal after , Enter the command :sudo vi ~/.bash_profile,
Edit add : Export ALLURE=/Users/XXX/Downloads/allure-2.7.0/bin( explain : The path shown above is allure Of bin Directory path )
Export PATH=PATH:ALLURE
The addition effect is shown in the figure below :
After adding, press :ESC Key and enter : wq! Save and exit
Step3、 Generate test results
stay terminal Enter commands in the :pytest —alluredir ./result/ To generate test results , As shown in the figure below , Will regenerate a result Directory to store these results
meanwhile terminal The execution results will also be displayed in :
Step4: Test results are converted into test reports
Convert the test result file to generate a test report .
Use command :allure generate ./result/ -o ./report/ —clean stay terminal Enter the command in , After the command is executed successfully, it will generate report Catalog , As shown in the figure below :
Step5: Browser to view the test report
Click on report In the catalog index.html File and open it with a browser , The effect is shown below :
There are many options in the menu bar on the left , It's all about testing case Display and explanation of different forms of execution result analysis , The visualization effect is very beautiful , Here are not screenshots to show , Interested partners can follow the above steps to experience Allure The power of visual reporting .
Friendship tips :“ The way of immeasurable testing ” Original works , Welcome to exchange , It is forbidden for a third party to reprint the article without displaying its source .
边栏推荐
- 英特尔集成光电研究最新进展推动共封装光学和光互连技术进步
- 启牛开的证券账户安全吗?
- Detailed explanation of issues related to SSL certificate renewal
- Guys, for help, I use MySQL CDC 2.2.1 (Flink 1.14.5) to write Kafka and set
- Detailed explanation of the binary processing function threshold() of opencv
- 安徽 中安在线文旅频道推出“跟着小编游安徽”系列融媒体产品
- The latest progress of Intel Integrated Optoelectronics Research promotes the progress of CO packaging optics and optical interconnection technology
- 明明的随机数
- Is it safe to open an account at Great Wall Securities? How to open an account when buying stocks
- BI技巧丨权限轴
猜你喜欢
redis分布式锁的8大坑总结梳理
一文掌握数仓中auto analyze的使用
从实时应用角度谈通信总线仲裁机制和网络流控
勾股数规律(任意三个数能够满足勾股定理需要满足的条件)
Online text line fixed length fill tool
Comment utiliser async awati asynchrone Task Handling au lieu de backgroundworker?
Stream流
The latest progress of Intel Integrated Optoelectronics Research promotes the progress of CO packaging optics and optical interconnection technology
牛客小白月赛7 谁是神箭手
Introduction to polyfit software
随机推荐
LeetCode 赎金信 C#解答
C#实现定义一套中间SQL可以跨库执行的SQL语句(案例详解)
HDU 1372 & POJ 2243 Knight Moves(广度优先搜索)
Shell 编程核心技术《二》
Summary and sorting of 8 pits of redis distributed lock
1011 World Cup Betting (20 分)(PAT甲级)
更安全、更智能、更精致,长安Lumin完虐宏光MINI EV?
Shell 编程核心技术《四》
问下各位大佬有用过cdc直接mysql to clickhouse的么
【问题】druid报异常sql injection violation, part alway true condition not allow 解决方案
2022-07-04: what is the output of the following go language code? A:true; B:false; C: Compilation error. package main import 'fmt' func
在线文本行固定长度填充工具
Unity编辑器扩展C#遍历文件夹以及子目录下的所有图片
明明的随机数
Shell 编程核心技术《三》
Generate XML elements
Go微服务(二)——Protobuf详细入门
Is the securities account opened by qiniu safe?
. Net ORM framework hisql practice - Chapter 2 - using hisql to realize menu management (add, delete, modify and check)
PointNeXt:通过改进的模型训练和缩放策略审视PointNet++