diff --git a/CHANGELOG.md b/CHANGELOG.md index 01efa6e0..c800ba20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ ### Bug Fixes ### +* Issue [379](https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/issues/379) Add the ability to supply a filename on the command line when starting up JMeter in GUI mode + ## Version 3.1.0 Release Notes (19 May 2020) ### Enhancements ### diff --git a/README.md b/README.md index 2fa26fd9..bdaa4e3c 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,12 @@ Once you have added the plugin to your project you will be able to invoke the JM mvn jmeter:configure jmeter:gui ``` +If you want to preload a test, you can specify it on the command line: + +``` +mvn jmeter:configure jmeter:gui -DguiTestFile=src/test/jmeter/test.jmx +``` + If you haven't added the plugin to your project you can still invoke it (provided you have a valid pom.xml in your project) by using the following: ``` diff --git a/src/main/java/com/lazerycode/jmeter/mojo/AbstractJMeterMojo.java b/src/main/java/com/lazerycode/jmeter/mojo/AbstractJMeterMojo.java index 286938cd..620bca59 100644 --- a/src/main/java/com/lazerycode/jmeter/mojo/AbstractJMeterMojo.java +++ b/src/main/java/com/lazerycode/jmeter/mojo/AbstractJMeterMojo.java @@ -132,7 +132,6 @@ public abstract class AbstractJMeterMojo extends AbstractMojo { @Parameter(defaultValue = "${settings}", readonly = true) protected Settings settings; - /** * Value class that wraps all proxy configurations. */ diff --git a/src/main/java/com/lazerycode/jmeter/mojo/RunJMeterGUIMojo.java b/src/main/java/com/lazerycode/jmeter/mojo/RunJMeterGUIMojo.java index ca7dfa0c..14182e22 100644 --- a/src/main/java/com/lazerycode/jmeter/mojo/RunJMeterGUIMojo.java +++ b/src/main/java/com/lazerycode/jmeter/mojo/RunJMeterGUIMojo.java @@ -30,7 +30,7 @@ public class RunJMeterGUIMojo extends AbstractJMeterMojo { /** * Supply a test file to open in the GUI once it is loaded. */ - @Parameter + @Parameter(defaultValue = "${guiTestFile}") private File guiTestFile; /**