Change request: Text field insread of drop down for WS/WSS

Issue #66 new
Former user created an issue

Hi, First great plugin works really nice and had a lot of features. Great work! There is couple of things I would like to see changes.

For many tests that combines HTTP(S) and WS(S) traffic jmeter variables are used. For example the default for Protocol in JMeter request is a text field this allows to create a user define variable, and reference it in each request. When a test script should be run with different protocol only one variable needs to be change instead of changing it in all places. If you could use the same logic for your plugin it would be helpful for many automation scenarios. Right now it is harder to switch between protocols.

Comments (3)

  1. Theodore Tegos

    This would be very useful to fully parameterize the load testing script from the command line and run it against different servers. If one server environment supports "ws" and another "wss", you need to duplicate the jmx file and select the corresponding protocol from the drop down list. The other fields (server name, port and path) are text fields, so their value can be passed in from the command line.

  2. Dániel Szabó

    If anyone stubled upon this and wanted to achieve this, it is managable to make it parameterizable with a JSR223 PreProcessor:

    if (sampler instanceof eu.luminis.jmeter.wssampler.WebsocketSampler) {
        log.info("Checking if WebsocketSampler protocol needs to be overriden...");
        def protocol = vars.get("protocol");
        def isTLS = "wss".equalsIgnoreCase(protocol);
        log.info("Overriding WebsocketSampler isTLS with: {}", isTLS);
        sampler.setTLS(isTLS);
    }
    

    ( just for the sake of the example, the snippet could be written better 🙂 )

  3. Log in to comment