Receive a request


Is it possible with gatling to declare a scenario where we wait an incoming HTTP request and to describe the corresponding response ?



Current HTTP support only covers the client side.
What are you trying to achieve?


In fact I would like to test a special REST application aiming machine to machine field which is different from a regular web server. In my case, the server can also be client in specific cases:

  1. The REST server hides real devices and manages authentication, rights… An incoming HTTP request targeted a real device is first treated by the REST application and then forwarded to the destination (in this case I would like to forward requests to Gatling)
  2. Users can register to the REST server in order to be notified of REST resources changes.
    2.1) The REST application sends client requests to the point of contact given by the user (this contact will be Gatling)
    2.2) The user opens a long poll communication channel (user sends an HTTP request blocked on the server side until a data becomes available, the content of the notification is then transmitted in the HTTP response body) (so in this case we don’t need server support in Gatling but here is another question: does Gatling supports long running requests and if yes can we exclude them from reports or treat them separately ?)

2013/3/9 Stéphane Landelle <>

Having Gatling act also as a server is out of its scope, sorry. In your case, I’d mock your real devices.
Regarding long polling, Gatling doesn’t really support it, and that timed out requests will simply be treated as failed. Websocket support will come in Gatling 2.