当前位置:网站首页>How does Jenkins play with interface automation testing?
How does Jenkins play with interface automation testing?
2022-08-10 05:16:00 【Liamhong】
Here's the thing, last week, a test classmate Xiaofei reported.Recently, I am using an interface management tool
Apifox
, which provides aCLI command
tool. It wants to combine continuous integration toolsJenkins
andThe CLI commands provided by >Apifox
perform automated testing on test cases.But he is not familiar with the use of Jenkins, I will sort out the whole process and share it with you
1 Apifox CLI
Apifox CLI is an interface continuous integration command line running tool provided by Apifox.It is used to support two methods, such as running online data in real time
and running with exported data
.
The installation method is as follows
npm install -g apifox-cli
Note: Apifox CLI depends on Node.js version >= v10
The following is a test case for the pet store interface provided by the official website. We use Apifox CLI and combine this test case to conduct automated testing.
Xiaofei: Where did the url in the command line in the above picture come from?
You can find Test Cases
in Apifox's Automated Test Tab
, then select the name of the use case you want to test and click Details.as shown below
Then in the details of the test case, click the continuous integration
button, and a continuous integration configuration window will pop up
Next we click New
in the Continuous Integration window
Finally, select the running environment, the number of loops, the number of threads, etc. in the window, and click Save to create the running url
The url of the test case continuous integration was created successfully
How to play Apifox on Jenkins?
1.1 Install Nodejs environment
After opening Jenkins, we first need to install the NodeJS
environment.The current version of Jenkins demonstrated is Jenkins 2.346.1
, if it is an older version of jenkin, the access operation path is different
First select the System Management menu in the left menu of the dashboard panel, then select Plugin Management under the System Configuration module
Select the optional plug-in, and search for Nodejs and click to install
1.2 Global Tool Configuration
After installing the Nodejs plug-in environment, you need to set the relevant configuration of Nodejs in the global tool configuration. The following figure shows the entry of the global tool configuration
Then select the Nodejs version
you want to run, if you are a window
operating system, you also need to specify the running path
1.3 New project Job
After completing the above environment configuration, you have completed half of the process. Next, we create a task Job to implement automated testing of the interface.
After the task is created successfully, select the build environment in the job configuration and set the Node as shown below
After setting, select the build module (build), create a new build step, and select the type: Execute Shell
Finally, we copy the continuous integration
url link generated by Apifox
above into the Shell input box
After completing the above operations, we can run this task Job, click the console output to see the output result!The result met our expectations!
Last
The cost of automated interface testing in the last century was very high. If the project fails to pass automated testing to ensure the quality of the interface, relying only on manual testing will not only be time-consuming and laborious, but also easily lead to problems!
Through the above introduction, we only need to use the url
link provided by Apifox
to run automated tests.Then integrate Apifox CLI into jenkins to achieve continuous integration of automated testing!Simply an artifact!
Apifox address: www.apifox.cn
边栏推荐
- 基于BP神经网络的多因素房屋价格预测matlab仿真
- 软考考生注意!2022年下半年报名详细流程来了!
- Using the DatePicker date control, Prop being mutated: "placement" error occurs
- `id` bigint(20) unsigned NOT NULL COMMENT 'Database primary key',
- ctf-pikachu-file_inclusion
- strongest brain (1)
- 暑期学前作业
- 【Pei Shu Theorem】CF1055C Lucky Days
- 各位大佬,idea中测试使用FlinkCDC SQL 读取Mysql 数据写入Kafka中,代码中创
- FPGA工程师面试试题集锦21~30
猜你喜欢
深度梳理:防止模型过拟合的方法汇总
线性模型中的高级特征选择技术——基于R
2022G3 Boiler Water Treatment Exam Mock 100 Questions and Mock Exam
暑期学前作业
【Static proxy】
通过一个案例轻松入门OAuth协议
EasyGBS connects to mysql database and prompts "can't connect to mysql server", how to solve it?
ThreadPoolExecutor线程池原理
深度学习之-01
An article to master the entire JVM, JVM ultra-detailed analysis!!!
随机推荐
栈与队列 | 用栈实现队列 | 用队列实现栈 | 基础理论与代码原理
awk of the Three Musketeers of Shell Programming
leetcode每天5题-Day12
I have a dream for Career .
EasyGBS连接mysql数据库提示“can’t connect to mysql server”,该如何解决?
The sword refers to Offer 033. Variation array
The time for flinkcdc to read pgsql is enlarged. Does anyone know what happened? gmt_create':1
十年架构五年生活-07 年轻气盛的蜕变
flinksql怎么写redis的value只有最后一个字段?
深度学习之-01
Abstract problem methodology
2022 security officer C certificate test and simulation test in shandong province
oracle cdc时,设置并行度2插槽数1,最终任务只有一个tm,是不是因为oracle不支持并发
如何取得某月的最后一天
aliases node analysis
我用这一招让团队的开发效率提升了 100%!
FPGA engineer interview questions collection 21~30
Rpc接口压测
Linear Algebra (4)
JS gets the year, month, day, time, etc. of the simple current time