Scénario : get the limit of my web socket with a condition: 90% of the requests should be ok

Hello,
I want to get the limit of the number of possible requests/sec on my web socket with 90 % of requests must be ok , ok for me is that the response time must be less than 3 seconds.
I am not able to build my scenario, I tried the assertions however it made my build fail.
Any hep to concept such a scenario please.
Thank you

Can you provide a sample of your code. It helps the community help you better.

From what I can see here, is that you will need to ramp up your load slowly, and have the assertion that are described here Gatling - Assertions

//scala
setUp(
  myScenario.inject(
      rampUsersPerSec(10).to(20).during(10.minutes) // you will need to change this according to your load
  ).protocols(httpProtocol)
 )
  .assertions(
    global.responseTime.max.lt(3000),
    global.successfulRequests.percent.gt(90)
  )

//java
setUp(
  myScenario.injectOpen(
    rampUsersPerSec(10).to(20).during(10.minutes) // you will need to change this according to your load
  ).protocols(httpProtocol)
 )
 .assertions(
     global().responseTime().max().lt(3000),
     global().successfulRequests().percent().gt(90.0)
  );
1 Like

Thanks shoaib42 for your answer however adding assertions will block report generation

however adding assertions will block report generation

No it won’t.

1 Like