Ori Marko
Ori Marko

Reputation: 58822

JMeter use in sanity testing in production servers

I'm using JMeter on development environment and I think of executing sanity tests on production servers.

Sanity of web sites login and other actions.

Is it reasonable to use JMeter on production servers? How to limit JMeter so it won't impact real users? I found only tutorial which doesn't advice it.

Do not run these tests against your production servers unless you know they can handle the load, or you may negatively impact your server's performance.

Upvotes: 0

Views: 649

Answers (2)

Dmitri T
Dmitri T

Reputation: 168132

From JMeter's point of view it doesn't really matter where you run your tests. Running load tests against production environment is very useful as this way you can discover "real" limitations, bottlenecks, integration and interoperabitity problems opposite to load testing in scaled down environments where you can only guess or calculate the anticipated production metrics.

Ideally you should have some form of "staging environment" which is an exact replica of production environment in terms of hardware, software and data.

If you cannot afford having "staging" environment to play with you can run your tests on production, however you need to keep in mind several important constraints to avoid "surprises"

  1. Run your tests in "dead" time when your application real life usage is minimal, i.e. over night or during weekends.
  2. Make sure JMeter test leaves the system at the same state as it was before test, i.e. if you create users, content, data, etc. - make sure you clean it up after the test so your system is not filled with "junk" data used for load testing. So consider using setUp Thread Group for setting up all the necessary test data and tearDown Thread Group to clean up after yourself
  3. Make sure you monitor your servers health so you will be notified when (if) your system is overloaded. You can use JMeter PerfMon Plugin for this.
  4. It would be also good to have AutoStop Listener enabled so JMeter test would stop automatically
  5. Consider adding SMTP Sampler to your test plan so you would be informed in case of unexpected errors.

Upvotes: 1

Ray Oei
Ray Oei

Reputation: 2088

As a engineering manager I would say: not in my life time ;-)

So what do you want to hear: that it is not a problem? Only you can tell whether it would be an issue if something behaves different from what you expect. My advise would be the same as what you are quoting: don't do it. Unless you know what you are doing, and even then...

Upvotes: 0

Related Questions