Hello
I’m making some tests with expressjs (v4) end playframework (v2), it’s just a get request, this is the expressjs code (very simple)
var express = require('express')
, bodyParser = require('body-parser')
, app = express()
, http_port = 9000
app.use(express.static(__dirname + '/public'));
app.use(bodyParser.json());
app.get("/humans", function(req, res) {
res.status(200).send([1,2,3,4,5,6]);
})
app.listen(http_port);
console.log("Listening on " + http_port);
I’ve the same service with play, on the same computer
I launch gatling with this code (on the same computer):
class BasicSimulationGetAll extends Simulation {
val httpConf = http
.baseURL("http://localhost:9000")
val scn = scenario("Get All Humans").repeat(100) {
exec(
http("get humans")
.get("/humans")
.check(status.is(200))
)
}
setUp(scn
.inject(rampUsers(50) over (60)).protocols(httpConf))
}
All is ok with Play
And with express, almost all requests are ko (nothing wrong express side (no error), it’s ok with postman) , this is an extract of the logs:
05:39:50.192 [GatlingSystem-akka.actor.default-dispatcher-7][WARN ][AsyncHandlerActor.scala:127] i.g.h.a.AsyncHandlerActor - Request ‘get humans’ failed: status.find.is(200), but actually found 304
05:39:50.193 [GatlingSystem-akka.actor.default-dispatcher-5][WARN ][AsyncHandlerActor.scala:127] i.g.h.a.AsyncHandlerActor - Request ‘get humans’ failed: status.find.is(200), but actually found 304
05:39:50.196 [GatlingSystem-akka.actor.default-dispatcher-7][WARN ][AsyncHandlerActor.scala:127] i.g.h.a.AsyncHandlerActor - Request ‘get humans’ failed: status.find.is(200), but actually found 304
05:39:50.198 [GatlingSystem-akka.actor.default-dispatcher-7][WARN ][AsyncHandlerActor.scala:127] i.g.h.a.AsyncHandlerActor - Request ‘get humans’ failed: status.find.is(200), but actually found 304
05:39:50.199 [GatlingSystem-akka.actor.default-dispatcher-7][WARN ][AsyncHandlerActor.scala:127] i.g.h.a.AsyncHandlerActor - Request ‘get humans’ failed: status.find.is(200), but actually found 304
05:39:50.200 [GatlingSystem-akka.actor.default-dispatcher-7][WARN ][AsyncHandlerActor.scala:127] i.g.h.a.AsyncHandlerActor - Request ‘get humans’ failed: status.find.is(200), but actually found 304
05:39:50.202 [GatlingSystem-akka.actor.default-dispatcher-9][WARN ][AsyncHandlerActor.scala:127] i.g.h.a.AsyncHandlerActor - Request ‘get humans’ failed: status.find.is(200), but actually found 304
05:39:50.203 [GatlingSystem-akka.actor.default-dispatcher-5][WARN ][AsyncHandlerActor.scala:127] i.g.h.a.AsyncHandlerActor - Request ‘get humans’ failed: status.find.is(200), but actually found 304