Maven + JMeter

  1. Use the following snippet in the pom.xml to integrate JMeter to Maven.
    1.        
              <plugins>
      		    <plugin>
      				<groupId>com.lazerycode.jmeter</groupId>
      				<artifactId>jmeter-maven-plugin</artifactId>
      				<version>2.6.0</version>
      				<executions>
      					<execution>
      						<id>jmeter-tests</id>
      						<goals>
      							<goal>jmeter</goal>
      						</goals>
      					</execution>
      					<execution>
      						<id>jmeter-check-results</id>
      						<goals>
      							<goal>results</goal>
      						</goals>
      					</execution>
      				</executions>
      			</plugin>
              </plugins>
          </build>
      
      
  2. Put your project.jmx under src/test/jmeter/ and then run ‘mvn verify’. https://github.com/jmeter-maven-plugin/jmeter-maven-plugin
  3. Install HTML publisher plugin in your Jenkins and configure a post action to publish the report.
  4. Go to Manage Jenkins, Script Console section and type this command:
    System.setProperty(“hudson.model.DirectoryBrowserSupport.CSP”, “”)

Without step 4, your report will be shown up empty. (Very terrible).