当前位置:网站首页>Pytest+request+allure+excel interface automatic construction from 0 to 1 [familiar with framework structure]
Pytest+request+allure+excel interface automatic construction from 0 to 1 [familiar with framework structure]
2022-07-07 09:10:00 【Song_ Lun】
One 、 framework design
# framework design
Api_test
bin
run.py -- Main run file
casefile
case.xlsx -- Column file
commext
consts.py -- Data caching
dbFunction.py -- Database encapsulation read
Fly_book.py --jenkins Connect flybook push notification
login.py -- Encapsulation of log
readconfig.py -- Read configuration file
readexecel.py -- Read case file
request_send.py -- Encapsulation of request mode
runcase_data.py -- Interface assembly and judgment logic
config
config.py -- The configuration file
logs
Interface automation _xxxx.log -- Log files
reports
--- The report file
mian
README.md -- Frame description .md
Let's look at two pictures
Interface automation Case Template As a free download password :at2d
Two 、 Related dependent environment construction
Please move : python3 Environment building
Code chip
// install python3 Depend on the environment
pip3 install xxx
base64-test0926==1.0.0
pytest==6.1.0
python-jenkins==1.7.0
PyYAML==5.3.1
redis==3.5.3
requests==2.24.0
SQLAlchemy==1.3.19
wheel==0.36.2
xlrd==1.2.0
PyMySQL==1.0.2
allure-pytest==2.8.18 # You need to unzip it and install it with this command
allure-python-commons==2.8.18 # You need to unzip it and install it with this command
Last 2 You need to Allure After the report configuration is completed, install , Otherwise, it will report a mistake
allure Is a decompression package , Here is a , Decompress after downloading , And configure environment variables
download allure Unzip the package
# Unzip the file in the container
unzip allure-2.13.0.zip
# Configure environment variables
vi /etc/profile
PATH Add later :$PATH:/allure-2.13.0/bin(allure The full path of )
source /etc/profile Preservation effective
Environment building pytest+request+allure
Complete code contain ( nailing / anonymous letter ) push / Call the police : To download
combination Docker+Jenkins Automated environment deployment You can complete the perfect online service monitoring ( What are you waiting for ? Let's try !!!)
Xiaobai can build an automated environment
边栏推荐
- OpenGL帧缓冲
- systemd
- PMP Exam details after the release of the new exam outline
- 2020 year end summary
- Skills that testers must know: Selenium's three waiting ways are interpreted clearly
- Troublesome problem of image resizing when using typora to edit markdown to upload CSDN
- Simulation volume leetcode [general] 1705 The maximum number of apples to eat
- cmake命令行使用
- [istio introduction, architecture, components]
- Goldbach conjecture C language
猜你喜欢
2020 year end summary
Locust performance test 2 (interface request)
Expérience de port série - simple réception et réception de données
Why is access to the external network prohibited for internal services of the company?
C language pointer (Part 2)
PMP Exam Preparation experience systematically improve project management knowledge through learning
2021 year end summary
Postman interface test (I. installation and use)
为不同类型设备构建应用的三大更新 | 2022 I/O 重点回顾
平台化,强链补链的一个支点
随机推荐
LED模拟与数字调光
How can I apply for a PMP certificate?
Port multiplexing and re imaging
2022-06-30 unity core 8 - model import
Two schemes of unit test
How to pass the PMP Exam in a short time?
模拟卷Leetcode【普通】1557. 可以到达所有点的最少点数目
Why is access to the external network prohibited for internal services of the company?
STM32串口寄存器库函数配置方法
How to use Arthas to view class variable values
C语言指针(下篇)
Several stages of PMP preparation study
Selenium mouse sliding operation event
What are the suggestions for PMP candidates?
C language pointer (exercises)
OpenGL三维图形绘制
Vagrant failed to mount directory mount: unknown filesystem type 'vboxsf'
为不同类型设备构建应用的三大更新 | 2022 I/O 重点回顾
Summary of PMP learning materials
H3C VXLAN配置