Reputation: 1025
Following is the relevent section of the pom file
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>1.8.1</version>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>install</phase>
<goals>
<goal>jmeter</goal>
</goals>
<configuration>
<propertiesUser>
<testData>test.csv</testData>
<threadNum>1</threadNum>
<rampUpPeriodSecs>5</rampUpPeriodSecs>
<loopCount>2</loopCount>
</propertiesUser>
</configuration>
</execution>
</executions>
<configuration>
<testFilesDirectory>test</testFilesDirectory>
<testResultsTimestamp>false</testResultsTimestamp>
</configuration>
</plugin>
When i execute the command mvn install
; all works fine the properties specified in propertiesUser
element get set and work.
But when i execute mvn jmeter:jmeter
none of user properties are set. Am I missing something?
Upvotes: 1
Views: 787
Reputation: 7466
It's a maven limitation, have a read of this:
http://docs.codehaus.org/display/MAVENUSER/Default+Plugin+Execution+IDs
It's also discussed here:
https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/issues/97
The problem is that Maven is ignoring everything within the execution block if you run the separate goals using the command line.
You could work around it by adding a GUI profile and a non-GUI profile and specifying your desired profile on the command line. To do this you would need to add your plugin config into a profile in your POM (lets call it GUI) and then specify a profile on the command line e.g.
mvn verify -PGUI
Upvotes: 0