Skip to content

Commit

Permalink
Fix #379 Add a default guiTestFile parameter
Browse files Browse the repository at this point in the history
This will allow a user to supply a path to a test file on the command line that will then be preloaded in the JMeter GUI when it starts.
  • Loading branch information
Ardesco committed Jul 3, 2020
1 parent 24873ae commit 96f1cc0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ###
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down

0 comments on commit 96f1cc0

Please sign in to comment.