1
votes

I am using jmeter plugin (WebSocket Samplers by Peter Doornbosch) for creating websocket requests manually.

Opening the connection to websocket

  • I use "Websocket Open Connection" sampler.
  • Fill all details (server,port,path)

The connection also requires sessionID.
I tried http header manager but it doesn't takes up the header while execution.

SO, is there a way to manually add websocket header to the (Websocket open connection) sampler?

1

1 Answers

3
votes

Http Header Manager is the way to go; the sampler picks up all the headers, except the ones that are used by the WebSocket or HTTP protocol itself (e.g. "Host", "Sec-WebSocket-Key"). If your header is called "sessionID", it definitely should work. See also the "Basic request-response sample with Header and Cookie Manager.jmx" example in the samples directory (https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/master/samples/)

Are you 100% sure the sampler did not include the header? Did you check the HTTP GET request with a tool like WireShark?