当前位置:网站首页>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
边栏推荐
- LeetCode 715. Range 模块
- What is the value of getting a PMP certificate?
- Output all composite numbers between 6 and 1000
- [istio introduction, architecture, components]
- Common operating commands of Linux
- OpenGL三维图形绘制
- Original collection of hardware bear (updated on June 2022)
- 2020 year end summary
- Simulation volume leetcode [general] 1609 Parity tree
- Original collection of hardware bear (updated on May 2022)
猜你喜欢

What is the use of PMP certificate?

Markdown editor Use of MD plug-in

C语言指针(习题篇)

PMP examination experience sharing

STM32串口寄存器库函数配置方法

STM32 clock system

JVM garbage collection detailed learning notes (II)

Systick滴答定时器

Troublesome problem of image resizing when using typora to edit markdown to upload CSDN

Esp32-ulp coprocessor low power mode RTC GPIO interrupt wake up
随机推荐
Un salaire annuel de 50 W Ali P8 vous montrera comment passer du test
The essence of high availability
寄存器地址名映射
9c09730c0eea36d495c3ff6efe3708d8
串口實驗——簡單數據收發
On December 8th, 2020, the memory of marketing MRC application suddenly increased, resulting in system oom
OpenGL 3D graphics rendering
Platformization, a fulcrum of strong chain complementing chain
What are the conditions for applying for NPDP?
Port occupation troubleshooting
Common short chain design methods
Several stages of PMP preparation study
Chaosblade: introduction to chaos Engineering (I)
ChaosBlade:混沌工程简介(一)
PPT模板、素材下载网站(纯干货,建议收藏)
STM32 serial port register library function configuration method
Expérience de port série - simple réception et réception de données
C language pointer (special article)
Screen automatically generates database documents
Output all composite numbers between 6 and 1000