0

My pom.xml looks like this:

<build>
    <plugins>
        <plugin>
            <groupId>com.lazerycode.jmeter</groupId>
            <artifactId>jmeter-maven-plugin</artifactId>
            <version>3.4.0</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>
                <propertiesUser>
                    <csvPath>${basedir}/src/test/resources/testData.csv</csvPath>
                    <threads>${threads}</threads>
                    <rampUp>${rampUp}</rampUp>
                </propertiesUser>
                <generateReports>true</generateReports>
                <propertiesJMeter>
                    <jmeter.save.saveservice.response_data>true</jmeter.save.saveservice.response_data>
                    <jmeter.save.saveservice.samplerData>true</jmeter.save.saveservice.samplerData>
                    <jmeter.save.saveservice.requestHeaders>true</jmeter.save.saveservice.requestHeaders>
                    <jmeter.save.saveservice.url>true</jmeter.save.saveservice.url>
                    <jmeter.save.saveservice.responseHeaders>true</jmeter.save.saveservice.responseHeaders>
                </propertiesJMeter>
            </configuration>
        </plugin>
    </plugins>
</build>

I have tried putting additional properties inside and tags too, but no luck. Rest/default details are getting fetched properly.

Please let me know if I do need change properties somewhere else too or in different way.

Thanks in advance!!

QA-Palash
  • 197
  • 2
  • 12

1 Answers1

1

The values you're trying to save are non suitable for CSV mode of the .jtl results file, you have the following options:

  1. Either switch the .jtl result file mode to xml - you will need to add the next line:

    <jmeter.save.saveservice.output_format>xml</jmeter.save.saveservice.output_format>
    

    but in this case you won't be able to generate HTML Reporting Dashboard, as of JMeter 5.4.1 it can be generated only from .jtl files in CSV format.

  2. Or add a separate Listener like Simple Data Writer to your Test Plan and choose what and where to store

    enter image description here

    More information: How to Save Response Data in JMeter

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • how can I overwrite the same xml file when running with Maven? Need to add any config? – QA-Palash Aug 11 '21 at 12:49
  • Add the next line to `` section: `DELETE`, it will tell JMeter to delete the file(s) used by the listener(s). More information: [Apache JMeter Properties Customization Guide](https://www.blazemeter.com/blog/apache-jmeter-properties-customization) and [JMeter Properties Reference: Miscellaneous Configuration](https://jmeter.apache.org/usermanual/properties_reference.html#miscellaneous) – Dmitri T Aug 11 '21 at 13:29