2

My Jmeter test plan has two threads. Each thread uses different CSV file, runs separate test.

I am expecting it to generate two JTL files at the end of execution. In order to achieve this I have added separate Aggregate Table listener to each thread as suggested here Jmeter: Test plan has two thread groups but it generated only 1 jtl report. Still it wasn't generating JTL files. So I upgraded Jmeter from 3.2 to 5.0 and Jmeter Maven Plugin from 2.1.0 to 2.7.0. Now it is generating two separate CSV files not JTL files.

What wrong am I doing? Or is it a limitation of plugin that it won't generate JTL files?

I am using Maven 3, Windows 7, Java

POM.xml

<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>com.demo.performancetesting</groupId>
    <artifactId>demo-performance-testing</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>com.lazerycode.jmeter</groupId>
                <artifactId>jmeter-maven-plugin</artifactId>
                <version>2.7.0</version>
                <executions>
                    <execution>
                        <id>jmeter-tests</id>
                        <goals>
                            <goal>jmeter</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>de.codecentric</groupId>
                <artifactId>jmeter-graph-maven-plugin</artifactId>
                <version>0.1.0</version>
                <configuration>
                    <configuration>
                        <resultsFileFormat>xml</resultsFileFormat>
                        <generateReports>false</generateReports>
                    </configuration>
                    <inputFile>${project.build.directory}/jmeter/results/*.jtl</inputFile>
                    <graphs>
                        <graph>
                            <pluginType>ResponseTimesOverTime</pluginType>
                            <width>800</width>
                            <height>600</height>
                            <outputFile>${project.build.directory}/jmeter/results/BlazeDemoRequest.png</outputFile>
                        </graph>
                    </graphs>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
Ardesco
  • 7,281
  • 26
  • 49
paul
  • 4,333
  • 16
  • 71
  • 144

2 Answers2

0

According to the JMeter Maven Plugin release notes

The current release of this plugin is 2.7.0, it requires JDK 8 and uses Apache JMeter 4.0

So I don't think you can really use JMeter 5.0 with the current version of the JMeter Maven Plugin.

Here are troubleshooting steps:

  1. Download JMeter 4.0 from JMeter Archives page and make sure your test runs fine on it. If there are any issues, i.e. your test uses a deprecated feature which doesn't exist any more, or you're suffering from an incompatible change - fix your test accordingly. Once you can run your test in GUI mode - you should be able to run it using Maven
  2. Check out the contents of target/logs file, it should contain a log file per your .jmx script which is(are) in src/test/jmeter folder, in the vast majority of cases JMeter log file contains enough information in order to be able to find out the root cause of the problem.

  3. If you cannot figure out the cause yourself - next time make sure to update your question with:

    • Test Plan screenshot
    • Output of mvn verify command
    • JMeter log(s) file contents
Dmitri T
  • 159,985
  • 5
  • 83
  • 133
0

If you want it to generate JTL (=XML) file add to maven plugin this:

            <plugin>
                <groupId>com.lazerycode.jmeter</groupId>
                <artifactId>jmeter-maven-plugin</artifactId>
                <version>2.7.0</version>
                <executions>
                    <execution>
                        <id>jmeter-tests</id>
                        <goals>
                            <goal>jmeter</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <resultsFileFormat>xml</resultsFileFormat>
                    <generateReports>false</generateReports>
                </configuration>
            </plugin>

See:

In the configuration you show, you are making a mistake as you are adding this to jmeter-graph-maven-plugin plugin

UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
  • Are you sure that formatting is correct? Is this supposed to be added in pom.xml? Oh you fixed formatting. let me test quickly – paul Oct 04 '18 at 05:36
  • It didn't work, it is still generating csv files in results directory. I have added, maybe I am doing something wrong – paul Oct 04 '18 at 05:55
  • The one that is in description is the updated one. Updated with configuration settings you gave. – paul Oct 04 '18 at 06:21
  • you need to put this in jmeter-maven-plugin not the other plugin – UBIK LOAD PACK Oct 04 '18 at 06:37