当前位置:网站首页>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 )
边栏推荐
- Automatic operation and maintenance sharp weapon ansible Foundation
- 全网最全tcpdump和Wireshark抓包实践
- How uipath determines that an object is null
- 网络分层概念及基本知识
- TCP connection is more than communicating with TCP protocol
- Error: Publish of Process project to Orchestrator failed. The operation has timed out.
- FlutterWeb浏览器刷新后无法回退的解决方案
- Automatic operation and maintenance sharp weapon ansible Playbook
- The solution to the left-right sliding conflict caused by nesting Baidu MapView in the fragment of viewpager
- Debug and run the first xv6 program
猜你喜欢
Interpretation of Flink source code (II): Interpretation of jobgraph source code
【MySQL入门】第三话 · MySQL中常见的数据类型
全网最全tcpdump和Wireshark抓包实践
EasyCVR平台通过接口编辑通道出现报错“ID不能为空”,是什么原因?
Pytorch extract middle layer features?
sql语句优化,order by desc速度优化
node の SQLite
EasyCVR接入设备开启音频后,视频无法正常播放是什么原因?
传统家装有落差,VR全景家装让你体验新房落成效果
SAP UI5 框架的 manifest.json
随机推荐
RepPoints:可形变卷积的进阶
Based on infragistics Document. Excel export table class
Interpretation of Flink source code (I): Interpretation of streamgraph source code
[elastic] elastic lacks xpack and cannot create template unknown setting index lifecycle. name index. lifecycle. rollover_ alias
BearPi-HM_ Nano development board "flower protector" case
The solution that flutterweb browser cannot be rolled back after refreshing
Chrome prompts the solution of "your company management" (the startup page is bound to the company's official website and cannot be modified)
微信小程序获取手机号
PyTorch 提取中间层特征?
Hongmeng introduction and development environment construction
李书福为何要亲自挂帅造手机?
Distributed (consistency protocol) leader election (dotnext.net.cluster implements raft election)
FlutterWeb瀏覽器刷新後無法回退的解决方案
pip install pyodbc : ERROR: Command errored out with exit status 1
Unity tips - draw aiming Center
C WinForm series button easy to use
Essai de pénétration du Code à distance - essai du module b
Interpretation of Flink source code (II): Interpretation of jobgraph source code
Development and practice of lightweight planning service tools
How to use scroll bars to dynamically adjust parameters in opencv