当前位置:网站首页>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 to use Arthas to view class variable values
- Esp32-ulp coprocessor low power mode RTC GPIO interrupt wake up
- Golang etcdv3 reports an error. The attribute in grpc does not exist
- How to pass the PMP Exam in a short time?
- Personal deduction topic classification record
- C language pointer (Part 1)
- Interview question: general layout and wiring principles of high-speed PCB
- Digital triangle model acwing 275 Pass a note
- 串口實驗——簡單數據收發
- Upgrade Alibaba cloud RDS (relational database service) instance to com mysql. jdbc. exceptions. Troubleshooting of jdbc4.communicationsexception
猜你喜欢
Serial port experiment - simple data sending and receiving
How to realize sliding operation component in fast application
STM32 clock system
MySQL主从延迟的解决方案
Reflections on the way of enterprise IT architecture transformation (Alibaba's China Taiwan strategic thought and architecture practice)
Unityshader introduction essentials personal summary -- Basic chapter (I)
端口复用和重映像
C language pointer (Part 1)
2022-06-30 unity core 8 - model import
JVM garbage collection detailed learning notes (II)
随机推荐
selenium自动化集成,八年测试经验软测工程师,一篇文章带你学懂
Common short chain design methods
Implement custom memory allocator
Unity shader beginner's Essentials (I) -- basic lighting notes
模拟卷Leetcode【普通】1609. 奇偶树
Systick滴答定时器
硬件大熊原创合集(2022/05更新)
【Istio Network CRD VirtualService、Envoyfilter】
Interpretation of MySQL optimization principle
Selenium automation integration, eight years of testing experience, soft test engineer, an article to teach you
Expérience de port série - simple réception et réception de données
Panel display technology: LCD and OLED
Isomorphic C language
JVM 内存结构 详细学习笔记(一)
What are the conditions for applying for NPDP?
模拟卷Leetcode【普通】1706. 球会落何处
Why is access to the external network prohibited for internal services of the company?
Interview question: general layout and wiring principles of high-speed PCB
Original collection of hardware bear (updated on May 2022)
Output a spiral matrix C language