Is it worth having one set of tests for both functional and performance testing?



  • I have been writing RESTful service tests using Jersey client. Though the tests are functional, it occurerd to me that I can execute same tests from JMeter and for performance (With some tweak of course like logging to capture desired time response only b/w certain operations).

    If not this approach then I would be writing RESTful service tests in JMeter using http sampler, with duplicating almost all the operations which I have covered in my functional tests.

    The advantage I see here is the ability to have one set of test for both functional and performance testing.

    I am curious to know if any other group tried this and has some recommendation on do's and don'ts



  • I have tried it and at times gotten some use out of it, the problem I have found when doing this is that often the scenarios I want to use for Functional Tests don't exploit enough of the system to really give me any meaningful performance metrics. My functional tool also doesn't allow this as it was chosen for its purpose, while my load test tool was chosen for its purpose; if yours can handle both then great!

    When I write Functional Tests I am just trying to exercise one aspect of the system repeatedly to make sure it passes the requirements, which is fine, and sometimes I get creative and work in some additional tests to get other areas tested as additional checks. That sometimes works. Although when I do performance profiling I am often looking to exercise other aspects of my product as there are areas that we know, or suspect, have issues with either load, load under performance or just performance and to exercise those adequately I need more than just a functional test.

    It's not to say you can't resuse scenarios, or functional tests and I don't know the Jersey tool, but I think what you have to consider is whether you can combine the tests in a meaningful way to correctly exercise your system so you get useful measures back to determine your performance. If you can exercise your tests in parallel, which my functional tool can't, then you could probably work it in your tool as well to be able to get some additional performance checks by doing compatability testing and running tests that exercise other areas of your product in parallel with the area you are concerned about.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 4
  • 2
  • 2