Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to add a custom name to the result file #316

Open
awadodeh opened this issue Mar 7, 2019 · 6 comments
Open

Add an option to add a custom name to the result file #316

awadodeh opened this issue Mar 7, 2019 · 6 comments

Comments

@awadodeh
Copy link

awadodeh commented Mar 7, 2019

I am using the current version of <jmeter.plugin.version>2.8.6</jmeter.plugin.version>, and I have a requirement to run a test on multiple machines and I believe it would be really nice to add the machine name to the generated report. Is this currently possible, if not, is it possible to be added?

PS: I moved away from distributed testing for a reason.

@pmouawad
Copy link
Contributor

pmouawad commented Mar 8, 2019

Do you mean adding it inside html content ?
And you mean the injector machine ?

Thanks

@Ardesco
Copy link
Contributor

Ardesco commented Mar 8, 2019

I'm making the assumption that this is a request to be able to modify the resultFilename, currently we generate this programatically. based on the test name.

@awadodeh
Copy link
Author

awadodeh commented Mar 8, 2019

I'm making the assumption that this is a request to be able to modify the resultFilename, currently we generate this programmatically. based on the test name.

This is exactly what I meant, it would be nice to have the option to rename the result file name, other than what the original *.jmx file name was.

@Ardesco
Copy link
Contributor

Ardesco commented Mar 10, 2019

The biggest problem implementing this is that we don't know the names of the .jmx files that are going to be used in advance, we use pattern matching to collect all of the files.

Possible solutions:

  • We could add a switch that would allow you to toggle the addition of a hostname to all files (should we ignore it if the hostname is the default?)
  • We could have a look at providing some variables that would be used to build up the results filename (could get very complex very quickly)
  • We could provide a mapping file that will set specific results file names if the test file name is an exact match (open to user error, confusing for people coming along later and changing a .jmx file name and potentially seeing a totally different results filename)
  • We could leave it as is.

@awadodeh
Copy link
Author

First of all, thank you for taking the time looking into it!

I totally get what you are saying, and it make sense.
This requirement is not really critical. However, jmeter provide the ability to provide a name for your result, it would be also nice to have it in the maven plugin too.

The first thought was to easily keep track of multiple test runs across multiple machines.
Regarding your approaches, I believe if we can add a switch that can evaluate the hostname at runtime, and add that to the all resultnames that would great.

@Ardesco Ardesco removed their assignment May 9, 2019
@Ardesco Ardesco added this to the 3.2.0 milestone Apr 27, 2020
@ahopgood
Copy link

ahopgood commented Jun 1, 2021

For anyone who still wants a means to add more information to the filename, I've made use of the resultsFileNameDateFormat to add a reference to a variable I can customise per environment/invocation.

<resultsFileNameDateFormat>yyyyMMdd-'${jmeter-results-env}'</resultsFileNameDateFormat>

Now I pass mvn clean verify -Pperformance-test -Djmeter-results-dir=qa to my profile to generate file names based on their environment in our CI/CD pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants