当前位置:网站首页>Getting started with pytest ----- allow generate report
Getting started with pytest ----- allow generate report
2022-07-06 17:49:00 【Peng Yuyan in the testing industry】
allure
Generate test reports
First of all, make sure that allure-pytest
plug-in unit
1) If it is Windows System , Want to go Git download 、 decompression 、 To configure path route .
2) If it is Mac, To install allure
, I tried brew install allure
But the installation failed , Always can't download . Only in a stupid way :
1. download allure
Address https://github.com/allure-framework/allure2/releases
download zip file , Then unzip it and put it in the directory you want to put .
2. Make sure you put allure
Of bin
Where is the folder
hold bin
Drag the folder to the terminal , then pwd
You can see the path :
3. Mac Configure environment variables
Input... At the terminal :open -t ~/.bash_profile
Open profile , Input :
PATH="/Users/macbook/allure-2.17.2/bin:${PATH}"
export PATH
chart 1: The open .bash_profile file
chart 2: Handwritten allure PATH
4. Make the configured environment variables take effect
Back to the terminal , Input source ~/.bash_profile
Enable environment variables
5. Input allure --version
Display version number , Prove that the configuration is successful
6. restart pycharm
modify pytest.ini
file , stay addopts
increase --alluredir ./temp
It means setting it up allure Generate json Temporary report path in format ./temp
It is put in the current path temp
Under the folder .
And then execute pytest
You can see in the temp
Many are generated in the folder .json
The file of
And then in pytest.main()
Add below
os.system("allure generate ./temp -o ./report --clean")
explain :
allure generate
command , fixed./temp
temporary json Path to format report-o
Output output./report
Generated allure Report path--clean
Empty report The original report under the folder
In this way report You can see the generated report under the folder
After opening :
There are many areas for improvement in this report , It can be displayed according to your needs , Let's talk about it later .
The following is the supporting information , For doing 【 software test 】 For our friends, it should be the most comprehensive and complete war preparation warehouse , This warehouse also accompanied me through the most difficult journey , I hope it can help you !
Last : It can be in the official account : Programmer Xiaohao ! Get a free copy of 216 Page software testing engineer interview guide document information . And the corresponding video learning tutorial is free to share !, It includes basic knowledge 、Linux necessary 、Shell、 The principles of the Internet 、Mysql database 、 Special topic of bag capturing tools 、 Interface testing tool 、 Test advanced -Python Programming 、Web automated testing 、APP automated testing 、 Interface automation testing 、 Testing advanced continuous integration 、 Test architecture development test framework 、 Performance testing 、 Safety test, etc. .
If my blog helps you 、 If you like my blog content , please “ give the thumbs-up ” “ Comment on ” “ Collection ” One button, three links ! Friends who like software testing , You can join our testing technology exchange group :779450660 There are various software testing resources and technical discussions )
边栏推荐
- Xin'an Second Edition; Chapter 11 learning notes on the principle and application of network physical isolation technology
- 历史上的今天:Google 之母出生;同一天诞生的两位图灵奖先驱
- RepPoints:可形变卷积的进阶
- The most complete tcpdump and Wireshark packet capturing practice in the whole network
- 2021-03-22 "display login screen during recovery" can't be canceled. The appearance of lock screen interface leads to the solution that the remotely connected virtual machine can't work normally
- EasyCVR电子地图中设备播放器loading样式的居中对齐优化
- C# NanoFramework 点灯和按键 之 ESP32
- Interpretation of Flink source code (I): Interpretation of streamgraph source code
- Vscode replaces commas, or specific characters with newlines
- The NTFS format converter (convert.exe) is missing from the current system
猜你喜欢
EasyCVR平台通过接口编辑通道出现报错“ID不能为空”,是什么原因?
[getting started with MySQL] fourth, explore operators in MySQL with Kiko
There is a gap in traditional home decoration. VR panoramic home decoration allows you to experience the completion effect of your new house
Pyspark operator processing spatial data full parsing (5): how to use spatial operation interface in pyspark
Summary of Android interview questions of Dachang in 2022 (I) (including answers)
Virtual machine startup prompt probing EDD (edd=off to disable) error
[translation] principle analysis of X Window Manager (I)
Unity粒子特效系列-闪星星的宝箱
EasyCVR接入设备开启音频后,视频无法正常播放是什么原因?
Spark accumulator and broadcast variables and beginners of sparksql
随机推荐
学 SQL 必须了解的 10 个高级概念
重磅!蚂蚁开源可信隐私计算框架“隐语”,主流技术灵活组装、开发者友好分层设计...
Unity小技巧 - 绘制瞄准准心
Binary search strategy
【MySQL入门】第一话 · 初入“数据库”大陆
【MySQL入门】第三话 · MySQL中常见的数据类型
Flet教程之 13 ListView最常用的滚动控件 基础入门(教程含源码)
Xin'an Second Edition: Chapter 23 cloud computing security requirements analysis and security protection engineering learning notes
scratch疫情隔离和核酸检测模拟 电子学会图形化编程scratch等级考试三级真题和答案解析2022年6月
Remote code execution penetration test - B module test
[getting started with MySQL] fourth, explore operators in MySQL with Kiko
Establishment of graphical monitoring grafana
node の SQLite
中移动、蚂蚁、顺丰、兴盛优选技术专家,带你了解架构稳定性保障
Spark accumulator and broadcast variables and beginners of sparksql
JMeter interface test response data garbled
OliveTin能在网页上安全运行shell命令(上)
C version selenium operation chrome full screen mode display (F11)
How to use scroll bars to dynamically adjust parameters in opencv
[elastic] elastic lacks xpack and cannot create template unknown setting index lifecycle. name index. lifecycle. rollover_ alias