Blazemeter / jmeter-http2-plugin

HTTP2 plugin for Apache JMeter
Apache License 2.0
45 stars 27 forks source link

HTTP2 Installer with interactive dialog in a batch instalation #35

Open 3dgiordano opened 1 year ago

3dgiordano commented 1 year ago

When the plugin is installed through the command line and not interactively, the plugin installer displays warning messages with the error.

These alert messages prevent the correct installation of the plugin in a batch mode. The http2 plugin installer must identify if it is in interactive GUI mode or in non-GUI batch mode, and based on which it should display to the user the error or log to the console or jmeter.log.

The two lines that need that logic

https://github.com/Blazemeter/jmeter-http2-plugin/blob/75f487686a6b98043a938ea8c08547d7f6899026/src/main/java/com/blazemeter/jmeter/http2/Installer.java#L21

https://github.com/Blazemeter/jmeter-http2-plugin/blob/75f487686a6b98043a938ea8c08547d7f6899026/src/main/java/com/blazemeter/jmeter/http2/Installer.java#L33

Note: The easy way to reproduce the problems is with java and the plugin manager using the following command java -jar ".\jmeter\lib\cmdrunner-2.2.jar" --tool org.jmeterplugins.repository.PluginManagerCMD install bzm-http2

3dgiordano commented 1 year ago

Analyzing more deeply the problem, I discovered when the plugin is installed on Linux o Mac, the .sh used by plugin manager, force to use the headless mode on awt, that mode, suppress all messages to the user and with that does not block the user./ But on Windows OS the plugin manager not enable that mode, and is possible to block the jmeter or taurus execution in the installation moment if run in batch (or taurus).

I propose to undera the fix on the .bat version of the plugin manager to try to handle plugins with interactive messages in a batch mode.

https://github.com/undera/jmeter-plugins-manager/pull/65

In any case, the plugin should take into consideration whether it is in interactive mode or not, and based on that information, leave the evidence of the problems in the jmeter log and not try to display messages.