Gatling Maven Plugin not picking up configs from pom.xml

235 views
Skip to first unread message

Barry Perez

unread,
Oct 11, 2016, 12:06:54 PM10/11/16
to Gatling User Group
Hi all,

I'm using the Gatling Maven plugin to run my tests (Version 2.2.0 of both Gatling and the maven plugin):

I'm trying to update some configurations (examples below), however the settings are not passed to Gatling:

  <plugin>
     <groupId>io.gatling</groupId>
     <artifactId>gatling-maven-plugin</artifactId>
     <version>2.2.0</version>
     <executions>
        <execution>
           <phase>test</phase>
           <goals>
              <goal>execute</goal>
           </goals>
           <configuration>
                   <simulationsFolder>src/main/scala</simulationsFolder>
                   <configFolder>src/main/resources</configFolder>
                   <jvmArgs>
                           <jvmArg>-Xmx2048m</jvmArg>
                  </jvmArgs>
           </configuration>
        </execution>
     </executions>
  </plugin>

I am however able to pass different folder locations on the command line as follows - but obviously I'd rather specify these in the pom.xml:

mvn gatling:execute -Dgatling.simulationsFolder=src/main/scala -Dgatling.configFolder=src/main/resources

Has anyone got any suggestions as to why this might not be working?

Thanks in advance.

Stéphane LANDELLE

unread,
Oct 11, 2016, 3:08:24 PM10/11/16
to gat...@googlegroups.com
You get maven executions wrong. Those are not triggered when directly launching a plugin goal, only on phases.

Stéphane Landelle
GatlingCorp CEO


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Barry Perez

unread,
Oct 12, 2016, 4:55:47 AM10/12/16
to Gatling User Group
Hi Stéphane,

Thanks - I was able to get it working using phases - example below for anyone else who comes across this:

Plugin info:

        <plugin>
            <groupId>io.gatling</groupId>
            <artifactId>gatling-maven-plugin</artifactId>
            <version>2.2.0</version>
            <executions>
                <execution>
                    <phase>test</phase>
                    <goals>
                        <goal>execute</goal>
                    </goals>
                    <configuration>
                        <simulationsFolder>src/main/scala</simulationsFolder>
                        <configFolder>src/main/resources</configFolder>
                        <simulationClass>${simulation}</simulationClass>
                        <noReports>false</noReports>
                        <jvmArgs>
                            <jvmArg>-Xmx2048m</jvmArg>
                        </jvmArgs>
                        <propagateSystemProperties>true</propagateSystemProperties>
                        <failOnError>true</failOnError>
                    </configuration>
                </execution>
            </executions>
        </plugin>

Command line to run

mvn clean test -Dsimulation=simulations.someSimulation

Barry

To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages