views:

207

answers:

5

Our product earned bad reputation in terms of performance. Well, it's a big enterprise application, 13 years old, that needs a refreshment treat, and specifically a boost in its performance.

We decided to address the performance problem strategically in this version. We are evaluating a few options on how to do that.

We do have an experienced load test engineers equipped with the best tools in the market, but usually they get a stable release late in the version development life cycle, therefore in the last versions developers didn't have enough time to fix all their findings. (Yes, I know we need to deliver earlier a stable versions, we are working on this process as well, but it's not in my area)

One of the directions I am pushing is to set up a lab environment installed with the nightly build so developers can test the performance impact of their code. I'd like this environment to be constantly loaded by scripts simulating real user's experience. On this loaded environment each developer will have to write a specific script that tests his code (i.e. single user experience in a real world environment). I'd like to generate a report that shows each iteration impact on existing features, as well as performance of new features.

I am a bit worried that I'm aiming too high, and it it will turn out to become too complicated.

What do you think of such an idea? Does anyone have an experience with setting up such an environment? Can you share your experience?

+2  A: 

It sounds like a good idea, but in all honesty, if your organisation can't get a build to the expensive load test team it has employed just for this purpose, then it will never get your idea working.

Go for the low hanging fruit first. Get a nightly build available to the performance testing team earlier in the process.

In fact, if this version is all about performance, why not have the team just take this version to address all the performance issues that came late in the iteration for the last version.

EDIT: "Don't developers have a responsibility to performance test code" was a comment. Yes, true. I personally would have every developer have a copy of YourKit java profiler (it's cheap and effective) and know how to use it. However, unfortunately performance tuning is a really, really fun technical activity and it is possible to spend a lot of time doing this when you would be better developing features.

If your developer team are repeatedly developing noticeably slow code then education on performance or better programmers is the only answer, not more expensive process.

Nick Fortescue
I agree, but don't developers have some responsibility for performance testing their code? just like they have to run unit tests before they deliver any other piece of code.
LiorH
The developers perspective can unfortunately be biased/skewed and far from real world usage...
Anonymous
How long does it take a developer to set up the environment until he can do a real world performance test? If that takes more than a few seconds, you'll lose more than you can win with this strategy.
Aaron Digulla
A: 

We built a small test bed, to do sanity testing - ie did the app fire up and work as expected when the buttons were pushed, did the validation work etc. Ours was a web app and we used Watir a ruby based toolkit to drive the browser. The output from those runs are created as Xml documents, and the our CI tool (cruise control) could output the results, errors and performance as part of each build log. The whole thing worked well, and could have been scaled onto multiple PCs for proper load testing.

However, we did all that because we had more bodies than tools. There are some big end stress test harnesses that will do everything you need. They cost, but that will be less than the time spent to hand roll. Another issue we had was getting our Devs to write Ruby/Watir tests, in the end that fell to one person and the testing effort was pretty much a bottleneck because of that.

MrTelly
A: 

Nightly builds are excellent, lab environments are excellent, but you're in danger of muddling performance testing with straight up bug testing I think.

Ensure your lab conditions are isolated and stable (i.e. you vary only one factor at a time, whether that's your application or a windows update) and the hardware is reflective of your target. Remember that your benchmark comparisons will only be bulletproof internally to the lab.

Test scripts written by the developers who wrote the code tends to be a toxic thing to do. It doesn't help you drive out misunderstandings at implementation (since the same misunderstanding will be in the test script), and there is limited motivation to actually find problems. Far better is to take a TDD approach and write the tests first as a group (or a separate group), but failing that you can still improve the process by writing the scripts collaboratively. Hopefully you have some user-stories from your design stage, and it may be possible to replay logs for real world experience (app varying).

annakata
+1  A: 

One of the biggest boost in productivity is an automated build system which runs overnight (this is called Continuous Integration). Errors made yesterday are caught today early in the morning, when I'm still fresh and when I might still remember what I did yesterday (instead of several weeks/months later).

So I suggest to make this happen first because it's the very foundation for anything else. If you can't reliably build your product, you will find it very hard to stabilize the development process.

After you have done this, you will have all the knowledge necessary to create performance tests.

One piece of advice though: Don't try to achieve everything at once. Work one step at a time, fix one issue after the other. If someone comes up with "we must do this, too", you must do the same triage as you do with any other feature request: How important is this? How dangerous? How long will it take to implement? How much will we gain?

Postpone hard but important tasks until you have sorted out the basics.

Aaron Digulla
+1  A: 

Nightly builds are the right approach to performance testing. I suggest you require scripts that run automatically each night. Then record the results in a database and provide regular reports. You really need two sorts of reports:

  • A graph of each metric over time. This will help you see your trends
  • A comparison of each metric against a baseline. You need to know when something drops dramatically in a day or when it crosses a performance threshold.

A few other suggestions:

  • Make sure your machines vary similarly to your intended environment. Have low and high end machines in the pool.
  • Once you start measuring, never change the machines. You need to compare like to like. You can add new machines, but you can't modify any existing ones.
Steve Rowe