views:

33

answers:

2

I'm currently writing integration tests for a RoR REST API using cucumber.

I'd also like to stress-test the API and was wondering how I might be able to re-use my cucumber scenarios to do this.

I've used JMeter and httperf before for stress-tests, and of course with both tools had to write or record the tests that I wanted to include in the stress testing. Since I already have the scenarios in Cucumber that I want to test, I'm trying to avoid having to rewrite what would be largely the same scenarios in the stress-testing tool's syntax.

Can anybody recommend a way that I could use my cuke tests for this? Ideally, I'd like to simulate hundreds of concurrent users hitting the API.

A: 

Hmm, what about creating some steps that perform a system call to httpref ?

Elad Meidar
+1  A: 

You very well may have to create your own load harness. Essentially, you'll need to start up a number of threads, each calling the process to start your scenarios. You will want to have a delay to stagger when each thread starts because there will be some overhead involved with loading the Ruby interpreter. You may also have to spread the load across more than one machine for the same reasons. It would probably be best to do this in separate processes. Perhaps this might be good for a new project?

Berin Loritsch