Question

Currently I have a small suite of integration tests running against my web-server which makes a request and asserts some assumptions on what the responses should be. These are written in Ruby generating http requests.

I've been looking at Gatling as a stress testing tool but I'm wondering if it could also be used for an integration tests as well. This way all the endpoint requests could be reused across the the stress tests and the integration tests.

I'm probably losing something here from not having the BDD of RSpec but gaining not having to create the same tests twice.

Does anyone have any experience of using gatling in this way?

Was it helpful?

Solution

You can use the Assertion API and set up acceptance criteria.

However, Gatling isn't a browser and won't run/test your Javascript, so this approach is only realistic when dealing with server side content, such as testing REST APIs. Here's an example.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top