How to do a reports-only with Maven plugin ?


I use maven to create the project and run the tests and it work fine.
Now I like to build the report of multiple run on different computers.
I used to do it with with parameter :
–reports-only agregation-’’’
But how to do it the maven way ?

Sorry if it’s an obvious question,I’m not familiar with maven and spend some time to find a solution.
The best I find is to make a second pom.xml with <reportsOnly>true</reportsOnly> but I thnk there is a better way.

Thank’s for your time

mvn -DreportsOnly=foo

mvn gatling:test -DreportsOnly=foo

Merci Stéphane,

But unfortunately it is not working for me, the command seems to ignore the “DreportsOnly” and try to run the simulation.

I have followed the tutorial
So my pom.xml contain :

<plugin> <groupId>io.gatling</groupId> <artifactId>gatling-maven-plugin</artifactId> <version>${gatling-maven-plugin.version}</version> <configuration> <reportsOnly>${reportsOnlyFolder}</reportsOnly> <simulationClass>fr.XXXX.simulations.${simulation}</simulationClass> <jvmArgs> <jvmArg>-DbaseUrl=${baseUrl}</jvmArg> <jvmArg>-Dusers=${users}</jvmArg> <jvmArg>-Drampup=${rampup}</jvmArg> <jvmArg>-Dduration=${duration}</jvmArg> <jvmArg>-Dthroughput=${throughput}</jvmArg> </jvmArgs> <propagateSystemProperties>true</propagateSystemProperties> </configuration> </plugin>

The solution I found is to build a pom-reportsOnly.xml with :

<plugin> <groupId>io.gatling</groupId> <artifactId>gatling-maven-plugin</artifactId> <version>${gatling-maven-plugin.version}</version> <configuration> <reportsOnly>${reportsOnlyFolder}</reportsOnly> </configuration> </plugin>

That I run with :

mvn -f pom-reportsOnly.xml gatling:test -DreportsOnlyFolder=cat target/gatling/lastRun.txt

And it works.

I’m using Gatling 3.1.3.

Best regards

I have followed the tutorial

Why not follow the official documentation instead?

I’m using Gatling 3.1.3

If you didn’t actually meant 3.3.1, you sure upgrade and use a modern version.

the command seems to ignore the “DreportsOnly”

My mistake, that’s -D**gatling.**reportsOnly