Continuous integration testing framework for Jenkins+ant+jmeter interface Automation

Source: Internet
Author: User
Tags html form

In the busy idle, these days to come back to study, the Jenkins+ant+jmeter interface automation of continuous integration testing of the entire environment to build a successful.
Now fill it up. ant installation website Download http://ant.apache.org/bindownload.cgi


2. After the download is successful, unzip it and put it on the local directory D:\ant\
Setting environment variables
Calculation--"attribute--" Advanced system Setup--"advanced-" environment variable--"new
Ant_home D:\ant\apache-ant-1.9.8
Next, add Ant's lib to the Class_path
%ant_home%\lib;
Then, add the ant bin to the path
%ant_home%\bin;
After the installation is complete, check that the installation is successful
run-– "cmd--" Ant version
JMeter Installation

Refer to previously written articles
http://blog.csdn.net/liujingqiu/article/details/51152377
At the moment, I'm using the 3.0 version. The installation method is the same. Jenkins installation

Refer to previously written articles
http://blog.csdn.net/liujingqiu/article/details/50988151 Environment Construction

After the Ant,jmeter,jenkins installation is successful, the environment is configured below. Jenkins's Ant plugin installation opens the Jenkins Web side
Click System Management to go to this page
Search for Ant Plugin, and after searching, install it.
After the ant plugin installation is successful, restart Jenkins so you can use ant plugin. Jenkins's ant configuration

1. How to create job and use job, please refer to previous article
http://blog.csdn.net/liujingqiu/article/details/50988393
And
http://blog.csdn.net/liujingqiu/article/details/51006763
2. As described in the previous article, after creating the job, select a job to enter the configuration.

So, go to the configuration page
3. Click Add Build step to select Invoke Ant, as shown in the figure:

4. Then go to the ANT configuration

Targets How to fill in the corresponding input box.
Based on the default= () in Ant's Build.xml, for example, in the current Build.xml

Then the targets here should enter all
5. Click the Advanced button

A page like this appears

6. In the expanded page, the one that must be filled in is the input box corresponding to the Build file, where the input should be the location of the Build.xml files, and the current Build.xml

7. Then in the build File, enter D:\ant\build.xml, as shown in the figure:

8. The remaining two items may not be entered here.

Then, click Apply, save, and exit the current Jenkins Ant configuration page.
At this point, Jenkins+ant+jmeter's integrated environment has been built.
Next is the preparation of the JMeter script and the Build.xml data preparation. the preparation of XXX.JMX

1. Create folder \jmetertest\testscript on the D disk of the PC (folder path can be created according to your needs)
2. Place the JMeter test script under the D:\jmeterTest\testscript folder path, Build.xml file is required.
the preparation of Build.xml

Below you need to prepare the configuration in Build.xml, use the nodepad++ software to open the Build.xml file, modify the key section as shown in the figure:
running the Jenkins job

To do this, our Jenkins+ant+jmeter integration test has been built successfully and can run ~
You can run the created job.

In this way, after the last run, you can get the test report in HTML form.
JMeter on the HTML form of the Interface test Report optimization, has been completed, pending tell ~ ~ ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.