I have to load test a WebSocket on Jmeter. WebSocket has been implemented using Springboot. I am facing an issue while sending Stomp data on Jmeter while testing. I am framing text appropriately according to stomp frame. This is the CONNECT frame:
log.info("Connect PreProcessor");
String con = "CONNECT\n" +
"login:${wsToken}\n" +
"passcode:admin\n" +
"accept-version:1.1,1.0\n" +
"heart-beat:0,0\n" +
"\n"+'\0' ;
vars.put("wsStompCon", con);
I am making a send request and when I am subscribing to the connection, AMQ establishes a connection, and I get the CONNECTED response. So no issue in connection. The issue happens when I am sending data as:
String User = "SEND\n" +
"content-length:39\n" +
"destination:/app/chat.newUser\n\n" +
"{\"sender\": \"Usr111222\",\"type\":\"JOIN\"}" +
'\0' ;
vars.put("wsAddUser", User);
I put the var 'wsAddUser' in the send sampler and am sending the data.
I get this error in response sampler:
ERROR message: Frame must be terminated with a null octet content-length:0
I am using websocket plugin by Peter Doornbosch mentioned:
https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/master/
I have changed the encoding to UTF-8 in Jmeter.Properties file as well. I think the issue is due to encoding but I'm not sure. What changes should I do for this issue?