当前位置:网站首页>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
边栏推荐
- How can I apply for a PMP certificate?
- Expérience de port série - simple réception et réception de données
- C语言指针(下篇)
- Calf problem
- STM32 serial port register library function configuration method
- 硬件大熊原创合集(2022/06更新)
- Personal deduction topic classification record
- Several methods of calculating the average value of two numbers
- C语言指针(习题篇)
- How long does the PMP usually need to prepare for the exam in advance?
猜你喜欢

硬核分享:硬件工程师常用工具包

NVIC interrupt priority management

面试题:高速PCB一般布局、布线原则

C语言指针(特别篇)

ESP32-ULP协处理器低功耗模式RTC GPIO中断唤醒

Do you have any certificates with high gold content?

Full link voltage test of the e-commerce campaign Guide

C language pointer (Part 2)

【Istio Network CRD VirtualService、Envoyfilter】

How long does the PMP usually need to prepare for the exam in advance?
随机推荐
Several stages of PMP preparation study
【istio简介、架构、组件】
With an annual salary of 50W, Alibaba P8 will come out in person to teach you how to advance from testing
STM32的时钟系统
Two schemes of unit test
C language pointer (Part 2)
寄存器地址名映射
Golang etcdv3 reports an error. The attribute in grpc does not exist
Implement custom memory allocator
Goldbach conjecture C language
Simulation volume leetcode [general] 1557 The minimum number of points that can reach all points
channel. Detailed explanation of queuedeclare parameters
C语言指针(习题篇)
Analysis of abnormal channel number information before and after AGC re signature service
PMP Exam details after the release of the new exam outline
Simulation volume leetcode [general] 1567 Length of the longest subarray whose product is a positive number
Analysis of Hessian serialization principle
H3C VXLAN配置
个人力扣题目分类记录
Selenium automation integration, eight years of testing experience, soft test engineer, an article to teach you