1

I'm able to generate HTML reports when I use 2.8.0 version of jmeter-maven-plugin. I clearly see one folder target\jmeter\reports. However, when I use 3.1.1 (latest) version, I don't see this folder at all.

Please let me know if there is any way to generate HTML reports with the latest version.

Below is my sample of my pom.xml:

       <plugins>
           <plugin>
               <groupId>com.lazerycode.jmeter</groupId>
               <artifactId>jmeter-maven-plugin</artifactId>
               <version>2.8.0</version>
               <executions>
                   <!-- Run JMeter tests -->
                   <execution>
                       <id>jmeter-tests</id>
                       <goals>
                           <goal>jmeter</goal>
                       </goals>
                   </execution>
                   <execution>
                       <id>configuration</id>
                       <goals>
                           <goal>configure</goal>
                       </goals>
                   </execution>
                   <!-- Fail build on errors in test -->
                   <execution>
                       <id>jmeter-check-results</id>
                       <goals>
                           <goal>results</goal>
                       </goals>
                       <configuration>
                           <generateReports>true</generateReports>
                       </configuration>
                   </execution>
               </executions>
           </plugin>
       </plugins>
   </build> ```
CMM
  • 543
  • 4
  • 16

1 Answers1

2

This configuration block:

<configuration>
   <generateReports>true</generateReports>
</configuration>

must be outside of the <execution> block

Full pom.xml just in case:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.example</groupId>
    <artifactId>jmeter</artifactId>
    <version>1.0-SNAPSHOT</version>

    <build>
        <plugins>
            <plugin>
                <groupId>com.lazerycode.jmeter</groupId>
                <artifactId>jmeter-maven-plugin</artifactId>
                <version>3.1.1</version>
                <executions>
                    <!-- Generate JMeter configuration -->
                    <execution>
                        <id>configuration</id>
                        <goals>
                            <goal>configure</goal>
                        </goals>
                    </execution>
                    <!-- Run JMeter tests -->
                    <execution>
                        <id>jmeter-tests</id>
                        <goals>
                            <goal>jmeter</goal>
                        </goals>
                    </execution>
                    <!-- Fail build on errors in test -->
                    <execution>
                        <id>jmeter-check-results</id>
                        <goals>
                            <goal>results</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <generateReports>true</generateReports>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

More information:

Dmitri T
  • 159,985
  • 5
  • 83
  • 133