Regarding Recording a Websocket API in Gatling

Hello All,

I have an API that uses websocket, it also has to pass file after opening the socket, is there a way to record it in gatling, i don’t have any client, i can’t use browsers, soupUI or Insomnia …

any kind of suggestion is really appreciated.

I also tried to write the scenario by my self but i have no idea what headers to pass.

This what i have tried:

val webSocketProtocol = http
 //.baseURL(xr18BaseURL)
 .wsBaseURL(BaseURL)
 .wsReconnect
 .wsMaxReconnects(3)
 .disableFollowRedirect
 .disableWarmUp

setUp(ServiceScenario.ServiceScn.inject(constantUsersPerSec(qps) during(duration) randomized).protocols(webSocketProtocol))

////////////////////////////
var files = returnFile.listOfFileStreams("src/test/resources/bodies").circular
val ServiceScn = scenario("Service")

   .feed(files)
    .exec(ws("request1").open("****"))
    .exec(ws("request2").sendBytes("${inStream}"))
    .exec(ws("request3").close)
    .exec(ws("request4").close)

Thanks,

Who calls the service?

If you can’t record or get a trace somehow then probably quickest to have a conversation with your devs?

Thanks,

Barry