当前位置:网站首页>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 .
边栏推荐
- [release] a tool for testing WebService and database connection - dbtest v1.0
- The page element is vertically and horizontally centered, realizing the vertical and horizontal centering of known or unknown width.
- Qt实现界面滑动切换效果
- Hough Transform 霍夫变换原理
- Is it safe to open an account at Great Wall Securities? How to open an account when buying stocks
- Leetcode ransom letter C # answer
- To sort out messy header files, I use include what you use
- Upgrade the smart switch, how much is the difference between the "zero fire version" and "single fire" wiring methods?
- 欧拉函数
- The 300th weekly match of leetcode (20220703)
猜你喜欢
mysql中explain语句查询sql是否走索引,extra中的几种类型整理汇总
Bi skills - permission axis
FPGA时序约束分享01_四大步骤简述
Use canal and rocketmq to listen to MySQL binlog logs
整理混乱的头文件,我用include what you use
大div中有多个div,这些div在同一行显示,溢出后产生滚动条而不换行
如何使用Async-Awati异步任務處理代替BackgroundWorker?
【问题】druid报异常sql injection violation, part alway true condition not allow 解决方案
Lm10 cosine wave homeopathic grid strategy
redis分布式锁的8大坑总结梳理
随机推荐
一文掌握数仓中auto analyze的使用
The 15th youth informatics competition in Shushan District in 2019
HDU 1372 & POJ 2243 Knight Moves(广度优先搜索)
Summary and sorting of 8 pits of redis distributed lock
整理混乱的头文件,我用include what you use
Shell programming core technology "I"
Unity adds a function case similar to editor extension to its script, the use of ContextMenu
Pytorch学习(四)
与二值化阈值处理相关的OpenCV函数、方法汇总,便于对比和拿来使用
牛客小白月赛7 I 新建 Microsoft Office Word 文档
The difference and usage between substr (), slice (), and substring () in the string interception methods of "understand series after reading"
英特尔集成光电研究最新进展推动共封装光学和光互连技术进步
Detailed explanation of the binary processing function threshold() of opencv
勾股数规律(任意三个数能够满足勾股定理需要满足的条件)
启牛开的证券账户安全吗?
Hough transform Hough transform principle
Download the first Tencent technology open day course essence!
LeetCode FizzBuzz C#解答
Caché WebSocket
如何使用Async-Awati异步任務處理代替BackgroundWorker?