Jmeter + Jenkins with interface testing

Simple Web interface test conducted by Jmeter interface and inefficient. For this purpose Jmeter interface testing and Jenkins joint, to achieve continuous integration. Once configured, simply modify the script to run Jmeter, after the end of the run test results are sent to the specified mailbox, convenient and efficient, improve the efficiency of regression testing.

A, establish and configure Maven project

1, the new Maven project

2, was added {basedir} src / test / jmeter directory

3, the script into jmeter {basedir} src / test / jmeter directory

4, modified POM file, add the content as follows:

POM configuration file to add:

 

5, upload source code into object code

B, Jmeter configuration and Jenkins

1, download, install and configure the environment variables Jmeter

2, start the Performance plugin Jenkins and install the plug-in and then restart

3, the new project and configuration Jenkins

Configuration code source

 

Configuring maven to build verif Goals

 

After configuring the build operation:

 

Select 'Add post-build action' -> 'Publish Performance test result report' option.

Select 'JMeter' option in the 'Performance report' drop-down list

In the 'Report files' fill '** / *. Jtl'.

Select 'Archive the artifacts' and 'Files to archive' fill '** / * jtl-report.html'.

 

 

 

Setup Mail TX Test Report

If you have multiple projects running simultaneously script, the script jmeter put {basedir} src / test / jmeter can, Jenkins will run sequentially. The test report here two items simultaneously sent to a mail, the configuration is as follows:

 

 

C, operating results

Jenkins console log is shown below:

 

 

Specifies the test report the message received is as follows:

 

Jenkins recent run will show a graph of response time and percentage of time fail recent graph, the response time shown in the graph below, it can be seen from FIG intuitive response time per request.

Guess you like

Origin www.cnblogs.com/buildingdream-996/p/11854950.html