In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces how to deploy the Jenkins+Ant+Jmeter interface automation test environment, the content is very detailed, interested friends can refer to, hope to be helpful to you.
* Environmental preparation:
OS:centos7
Jmeter:apache-jmeter-4.0 download: http://mirror.bit.edu.cn/apache//jmeter/binaries/apache-jmeter-4.0.tgz
Ant:ant1.9.7 download: http://mirrors.hust.edu.cn/apache//ant/binaries/apache-ant-1.10.3-bin.tar.gz
Javamail.jar download: https://github.com/javaee/javamail/releases
Commons-email: download: http://central.maven.org/maven2/org/apache/commons/commons-email/1.5/commons-email-1.5.jar # ant sends an email notification after the build is completed
Activation.jar download: http://central.maven.org/maven2/javax/activation/activation/1.1.1/activation-1.1.1.jar
1. Ant and Jmeter configuration environment
Ant and jmeter environment variable configuration:
Cat / etc/profile.d/java.sh
# #
JAVA_HOME=/usr/java/jdk1.8.0_25JRE_HOME=/usr/java/jdk1.8.0_25/jreANT_HOME=/usr/local/ant/JMETER_HOME=/usr/local/apache-jmeter-4.0PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$ANT_HOME/bin:$JMETER_HOME/binCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/libexport JAVA_HOME JRE_HOME PATH ANT_HOME JMETER_HOME CLASSPATH
# #
Ant installation directory: / usr/local/ant
Jmeter installation directory: / usr/local/apache-jmeter-4.0
Version View:
Ant-version
Jmeter-v
2. Jmeter configuration
Jmeter configuration build.xml file
Create a new work directory under jmeter installation directory
Mkdir-p / usr/local/apache-jmeter-4.0/work
Cd / usr/local/apache-jmeter-4.0
Chmod 777 work
Mkdir-p / usr/local/apache-jmeter-4.0/work/report # create a new report folder and save the report
Cd / usr/local/apache-jmeter-4.0/work
Chmod 777 report
Create a new build.xml file under / usr/local/apache-jmeter-4.0/work directory
Vim build.xml
Jmeter test interface result!
3. Run the script file
Cd / usr/local/apache-jmeter-4.0
Vim bin/jmeter.properties modification:
Jmeter.save.saveservice.output_format=xml
Throw the three jar packages of javamail.jar, commons-email.jar and activation.jar into the lib directory of ant. And upload the tested jmx file to the / usr/local/apache-jmeter-4.0/work directory.
Enter the / usr/local/apache-jmeter-4.0/work directory and enter the ant command. The following indicates success:
4. Deploy to Jenkins platform
Jenkins global configuration:
Create a new project job with related configurations:
The first parameter represents the minute minute, with a value of 0059.
The second parameter represents the hourly hour, with a value of 0023.
The third parameter represents the day day, with a value of 1-31.
The fourth parameter represents the monthly month, with a value of 1-12.
The last parameter represents the week of the week. The values of 0,7, 0 and 7 represent Sunday special format.
All valid values; Mmurn specifies the range of values; M-N/ X or / X refers to the value of the specified area or the entire valid range in X steps.
Enumerate multiple values eg.
Hpassword 15 is executed every 15 minutes H (0-29) / 10 every 10 minutes every 10 minutes.
H 9-16 ram 2 1-5 every two hours during the 9-16 o'clock of each working day
H H 1Jing is executed on the 1st and 15th of each month from January to November, 2001 to November.
Jenkins build, console output:
On how to deploy the Jenkins+Ant+Jmeter interface automation test environment is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.