I'm new to JMeter from Java Selenium, and I am trying to carry out the following actions:
- Upload a file
- Wait for websocket response indicating that file has successfully uploaded.
To this effect, I am using the Websocket Single Read Sampler from this plugin,
My script is currently structured as
My Test Plan
upload the file (This part at least works)
While
${__javaScript("${UPLOADING}" != "false",)}
a. Websocket Single Read Sampler: Sampler ↪JSON Extractor setting${UPLOADING}
tois-in-progress
b. JSR223 Sampler:
log.info("Current Status: " + UPLOADING)
for debugging+logging
I have also tried Websocket Open Connection + Websocket Single Read Sampler (use existing connection). While I can open the connection successfully, in both cases I get WebSocket I/O error: Read timed out
and the Single Read Sampler fails without showing up in the the log. The only error in the log is No such Property: Uploading for class
because UPLOADING doesn't exist.
I'm new to JMeter from Java Selenium, and I am trying to carry out the following actions:
- Upload a file
- Wait for websocket response indicating that file has successfully uploaded.
To this effect, I am using the Websocket Single Read Sampler from this plugin,
My script is currently structured as
My Test Plan
upload the file (This part at least works)
While
${__javaScript("${UPLOADING}" != "false",)}
a. Websocket Single Read Sampler: Sampler ↪JSON Extractor setting${UPLOADING}
tois-in-progress
b. JSR223 Sampler:
log.info("Current Status: " + UPLOADING)
for debugging+logging
I have also tried Websocket Open Connection + Websocket Single Read Sampler (use existing connection). While I can open the connection successfully, in both cases I get WebSocket I/O error: Read timed out
and the Single Read Sampler fails without showing up in the the log. The only error in the log is No such Property: Uploading for class
because UPLOADING doesn't exist.
1 Answer
Reset to default 0You need to change UPLOADING
to vars.get('UPLOADING')
where vars
is a shorthand for JMeterVariables class instance.
See Top 8 JMeter Java Classes You Should Be Using with Groovy article for more details.
In WebSocket Single Read sampler you can try ticking use existing connection
, if you say what the connection can successfully be established it might resolve your issue.
Also you can try enabling debug logging for the WebSocket Samplers plugin, it can be done by adding the next line to log4j2.xml file
<Logger name="eu.luminis" level="debug" />
Check documentation on the plugin for more details and troubleshooting tips.