aspose file tools*
The moose likes Testing and the fly likes Stress test in Java Web application with Cucumber? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Stress test in Java Web application with Cucumber?" Watch "Stress test in Java Web application with Cucumber?" New topic
Author

Stress test in Java Web application with Cucumber?

Rogerio Kioshi
Ranch Hand

Joined: Apr 12, 2005
Posts: 689
Is it possible performing stress tests in Java Web application with Cucumber?


SCEA 5 (part 1), SCBCD, SCWCD, SCJP, CLP, CLS
Matt Wynne
author
Greenhorn

Joined: Feb 17, 2012
Posts: 14
Hi Rogerio,

Yes, it is possible. The way to do it is to specify concrete examples of scenarios that the system will find itself in under stress. For example:

Given 1000 users are hitting the homepage simultaneously
When I request the homepage
Then I should get a response within 2ms

or

Given there are 100,000 users registered on the system
When I create a new account
Then I should be taken to my dashboard within 5ms

Talking through these kinds of scenarios with your stakeholders will help you to understand where the boundary is for what they consider to be acceptable performance. Now you have agreement about this, the next step is to work out how to automate these scenario, by calling your load testing tool of choice from the Cucumber step definitions.

The key thing is to have Cucumber delegate to the stress testing tool, rather than the other way around. A common mistake people make is to simply point JMeter at existing Cucumber scenarios, but this doesn't give you the benefit of having the parameters of the test documented in a readable Cucumber scenario.

These are not normal kinds of Cucumber tests. You would need to run these against an environment that's representative of your production hardware, whereas normal behaviour scenarios could be run against any environment. It's useful to create these scenarios early on during the project and run them against every build so they become constraints within which the project must proceed.


cheers,
Matt

--
Freelance programmer & coach
Author, http://pragprog.com/book/hwcuc/the-cucumber-book
Founder, http://www.relishapp.com/
Twitter, https://twitter.com/mattwynne
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Stress test in Java Web application with Cucumber?