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 support for jmx2dsl to output to a target file #136

Open
andy-tarr opened this issue Sep 16, 2022 · 3 comments
Open

Add support for jmx2dsl to output to a target file #136

andy-tarr opened this issue Sep 16, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@andy-tarr
Copy link
Contributor

It would be great if jmx2dsl could generate a class file instead of just console output

@rabelenda
Copy link
Contributor

rabelenda commented Sep 16, 2022

Hello, thank you for reporting this!

You can use bash output redirection to get the file with a name of your choosing, eg:

java -jar jmx2dsl.jar my.jmx> MyPerformanceTest.java

The main problem this has is that class name defined inside the .java file would not match the one of the file, but can easily be changed, or even automated with grep, ex:

java -jar jmx2dsl.jar my.jmx | grep 's/PerformanceTest/MyPerformanceTest/g' > MyPerformanceTest.java 

Additionally, for each conversion you should check the generated class and do some cleanup (for instance jbang comments for dependencies, and main method definition), and even do some tuning. Consider jmx2dsl as a facilitator, or initial conversion, but always look into converted test plan and adjust accordingly.

In any case might be a good idea to add some flag to the command to control the naming, and potentially ignore jbang dependencies and main invocation.

@rabelenda rabelenda added the enhancement New feature or request label Sep 16, 2022
@rabelenda
Copy link
Contributor

@andy-tarr do you think the proposed command line executions are good enough? Or do think that it would anyways make sense to have such option?

Regards

@andy-tarr
Copy link
Contributor Author

@rabelenda the suggested command line options could be sufficient but I think it would make sense to have the option to output to file and set the classname accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants