当前位置:网站首页>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 )
边栏推荐
- 10 advanced concepts that must be understood in learning SQL
- It doesn't make sense without a distributed gateway
- Hongmeng introduction and development environment construction
- In terms of byte measurement with an annual salary of 30W, automated testing can be learned in this way
- Xin'an Second Edition: Chapter 23 cloud computing security requirements analysis and security protection engineering learning notes
- The most complete tcpdump and Wireshark packet capturing practice in the whole network
- Debug and run the first xv6 program
- Spark accumulator and broadcast variables and beginners of sparksql
- [rapid environment construction] openharmony 10 minute tutorial (cub pie)
- VR panoramic wedding helps couples record romantic and beautiful scenes
猜你喜欢
OliveTin能在网页上安全运行shell命令(上)
自动化运维利器ansible基础
偷窃他人漏洞报告变卖成副业,漏洞赏金平台出“内鬼”
学 SQL 必须了解的 10 个高级概念
当前系统缺少NTFS格式转换器(convert.exe)
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
2022年大厂Android面试题汇总(一)(含答案)
TCP connection is more than communicating with TCP protocol
EasyCVR接入设备开启音频后,视频无法正常播放是什么原因?
Distinguish between basic disk and dynamic disk RAID disk redundant array
随机推荐
RepPoints:可形变卷积的进阶
偷窃他人漏洞报告变卖成副业,漏洞赏金平台出“内鬼”
遠程代碼執行滲透測試——B模塊測試
OliveTin能在网页上安全运行shell命令(上)
Development and practice of lightweight planning service tools
Cool Lehman has a variety of AI digital human images to create a vr virtual exhibition hall with a sense of technology
Alertmanager sends the alarm email and specifies it as the Alibaba mailbox of the company
After entering Alibaba for the interview and returning with a salary of 35K, I summarized an interview question of Alibaba test engineer
虚拟机启动提示Probing EDD (edd=off to disable)错误
Growth of operation and maintenance Xiaobai - week 7
78 岁华科教授逐梦 40 载,国产数据库达梦冲刺 IPO
In terms of byte measurement with an annual salary of 30W, automated testing can be learned in this way
Vscode matches and replaces the brackets
Spark calculation operator and some small details in liunx
How to use scroll bars to dynamically adjust parameters in opencv
Xin'an Second Edition: Chapter 23 cloud computing security requirements analysis and security protection engineering learning notes
Unity tips - draw aiming Center
The shell generates JSON arrays and inserts them into the database
Xin'an Second Edition: Chapter 26 big data security demand analysis and security protection engineering learning notes
Single responsibility principle