当前位置:网站首页>Build JMeter + Jenkins + ant sustainability
Build JMeter + Jenkins + ant sustainability
2022-04-22 00:43:00 【Are you sorry?】
apache Ant, It's about compiling software 、 test 、 A tool to automate steps such as deployment , Mostly for Java Software development in the environment . from Apache The software foundation provides .
Ant It has the following advantages . Cross-platform sex .Ant Is pure Java Language Compiling , So it has a good cross platform . It's easy to operate .Ant It consists of a built-in task and an optional task .Ant A... Is required at run time XML file ( Build file ,build.xml). Ant By calling target Trees , You can do all kinds of task. Every task Implemented specific interface objects . because Ant Build file yes XML File format , So it's easy to maintain and write , And the structure is clear .Ant Can be integrated into the development environment . because Ant Cross platform and easy to operate , It's easy to integrate into some development environments .
To configure ant
1: open Test Folder

2: find Test Medium ant The following path under the folder

3: Configure environment variables
take ant Of bin The directory is written to the computer path environment variable

4: verification ant Is the installation successful , Success is shown below

5: Configuration library file
take jmeter extras In the catalog ant-jmeter-1.1.1.jar File copy to ant Install under directory lib In the folder ,


6: To configure ant Of Compile the file build.xml
Be careful :jmeter Of extras There is also a... Under the file build.xml file , Don't use this document to change
It will be as shown in the figure below build.xml copy to Text Under the TestAuto In the catalog pc Directory


modify build.xml The data in the file

6: To configure jmeter.propertise file
find jmeter.properties file , stay jmeter/bin Under the table of contents , Open the document and edit , modify jmeter The report output format is xml:
Change jmeter.save.saveservice.output_format=csv by jmeter.save.saveservice.output_format=xml, And remove the previous annotation symbol #

7: stay build.xml Enter... In the directory cmd, And implement ant

8: If the information shown in the figure below appears , Need to put javax.mail-1.6.2.jar bag ant Of \lib Under the directory

9: As shown in the figure below :

10: The following problems occur during operation

Generate the corresponding information as shown in the figure above , Find the corresponding test report ( Failed to send email )
Click as shown in the figure below : open html file , The test results show the name of the case executed 、 The success rate 、 Result parameters such as case execution time , What kind of result is not very intuitive , Because with jmeter The test report information obtained from the self-contained test report is not very complete , Let's talk about how to optimize the test report

The problem of mail sending failure has been solved above
Sign in QQ mailbox , Click Settings

- Click account
- Turn on SMTP service

Send a text message

Replace the sent authorization code with build.xml The password of the recipient in

Replace the email receiving mailbox , And authorization code replacement build.xml The password of the recipient in 
Again in build.xml Execute under the parent folder ant command , Execute successfully and send mail 

Modify the style of the test report
Put... In the picture jmeter-results-shanhe-me.xsl, copy to jmeter Of extras Directory

Set what the test output report will output : Also in jmeter.properties in , Set the content to be output as true, And remove the previous annotation symbol #, It's all set to true→ preservation

Set up build The report template of the file is the optimized template jmeter.results.shanhe.me.xsl
Again in build.xml Execute under the parent folder ant command


Tomcat Installation and environment variable configuration

Configuration of environment variables
Right click “ My computer ”>> choice “ attribute ”>> Click the left column “ Advanced system setup ”>>“ senior ”>>“ environment variable ”
1. newly build CATALINA_HOME Variable
Variable name :CATALINA_HOME
A variable's value : After decompressing tomcat route

take tomcat Medium bin Add to path in
stus
Turn on tomcat There are two ways
The way 1:
stay dos Window type startup,, As shown below

The way 2:
Find Tomcat Under the installation directory of bin file , Click on startup.bat that will do (window Environmental Science )

Close the service , Click on shutdown.bat

To configure Jenkins, Build continuous integration
1: The following jenkins.war bag tomcat Corresponding webapps Next

2 start-up tomcat service , stay dos Input in startup Or in tomcat Of bin Click in the directory startup.bat

3: Sign in 127.0.0.1:8080 see tomcat Can I log in , The following shows the normal description tomcat Service and opening

4:Tomcat When the server runs , Access with browser http://ip Address : Port number /jenkins, As shown in the figure below :
Paste the password under the corresponding path . The following figure shows the information ,

5: Find the corresponding file , Fill in the password , Click on ” continue ” Button

6: As shown in the figure below . Click on ” Install the recommended plug-ins ”

7: It takes a certain waiting time , Network speed may be affected

8: You can create an administrator account , As shown in the figure below :( Don't forget the password )
9: Generate a url : http://127.0.0.1:8080/jenkins,” Click save and finish ”

10: The following information appears , Click on ” Start using jenkins”
11: Enter into jenkins in
Fill in the project name , Select free wind , Click on ” determine ” Button

Build trigger : Such as H/2 * * * *
minute (0-59), Hours (0-23), date (1-31) month (1-12) week (0-7)// 0 and 7 All represent Sunday
Select trigger
Click on ” senior ” Button , take build.xml Fill in the path to build File
Click save

Display the newly created project on the workbench
Click on the right to build 
Successful implementation 
Received email

版权声明
本文为[Are you sorry?]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211752085146.html
边栏推荐
- Abbreviations of proper nouns of information system project manager & common vocabulary
- Sqlserver -- regular expression
- What has changed since Huawei Routing & Switching switched to datacom
- Mobile Internet app development, byte beating, JD 360 Netease interview questions sorting
- R-Dropout
- [Golang]力扣Leetcode - 657. 机器人能否返回原点(模拟)
- Jmeter压测MQTT结果分析
- 完整的数据分析是怎样的流程
- 分布式事务与Seata
- .NET 20周年学习挑战赛| .NET 移动应用
猜你喜欢
随机推荐
Linuix cat instruction
Introduction to microservices, euraka, ribbon, openfeign
It is said that MES can improve the production efficiency of enterprises. What are the specific aspects?
跨链桥漏洞总结
[Niuke] you must brush the top101-01 linked list for the interview
GPU的未来方向是什么?
C language structure
物联网专业未来没有前途了吗?
linuix cat指令
gorm 操作mysql
HMS Core 6.4.0版本发布公告
线程池详解
Gorm operation MySQL
Abbreviations of proper nouns of information system project manager & common vocabulary
Unity determines whether the file (under the local absolute directory) exists
移动互联网app开发,字节跳动 京东 360 网易面试题整理
Sqlserver - Excel database connection related knowledge
Redis(二):redis高级——linux下redis基本操作、持久化、事务、删除策略、服务器基础配置redis.conf、高级数据类型
Tree and binary tree
Mobile Internet development major, an interview experience about JVM








![[Golang]力扣Leetcode - 657. 机器人能否返回原点(模拟)](/img/50/7e483e2d2761b60f05c3ae8a928137.png)
