If you asked me to describe Agile Development in one word, that’s the word I’d choose: fast. The notion of speed is embedded into the very fabric of Agile. You find it in all sorts of Agile terms and practices. Think about it:
- You plan everything in sprints.
- You measure the velocity of the team to improve efficiency.
- Coordination happens in a 15-minute daily standup.
- Even integration happens continuously.
So why is it that performance testing is often saved for the end of the Agile Development process? It’s like developers think they can’t improve efficiency until all the code is written, so they just wait until it’s done before trying. It’s odd, because in a culture that’s obsessed with speed, you’d think that improving the speed of the application would be a front-and-center activity.
Most of the time, that’s not the case.
We’ve written a few posts recently about how load testing and performance testing aren’t always as agile as they ought to be. But why are we in this situation in the first place? Often, it’s because there are a lot of misconceptions that people have about what’s possible with respect to performance testing in an Agile setting. People don’t necessarily understand what it takes to do a good job in this area.
As a performance engineer, we wanted to arm you with a few of the common misconceptions out there, and give you some helpful ways of addressing them. That way, you can push your performance testing initiatives deeper into your Agile process, improving your application and making your end users happy.
Misconception #1: Performance Testing Is Just Different – It Doesn’t Fit Into Agile
There’s a lot more to load testing that that big, massive, full-throttle, peak-usage stress test – you know the one, it’s essentially designed to push the entire environment to its breaking point. Unfortunately that’s how many people see the entire endeavor of performance testing, as wrapped up in that one kind of test. So naturally people don’t think that performance testing is something that can easily fit into the small-batch, highly iterative world of Agile.
As you know, there’s a whole lot more to performance testing than that. Individual modules can be tested for performance just as easily as they can be tested for functionality. By developing a suite of modular performance test scenarios, you can help dispel this myth. Create tests for common queries or critical transactions. That way your peers will understand there are lots of ways that performance testing can fit into the normal Dev-Test-Ops cycle.
Misconception #2: Performance Tests Can’t Be Run Quickly Enough for Agile
For some types of tests, this is true. Think about a complicated stress test that requires the entire production environment to operate. You can’t hijack your whole system to run this test every time you do a build. After all, you have a business to run! What would happen to the users if this were the case?
However, there are plenty of ways to segment that activity and perform targeted performance testing. In fact, one of the best things you can do is think about performance requirements up front and build them into your specification process. For agile, this means putting performance SLAs on the task board. By doing so, you can automate a lot of basic testing as part of your normal, continuous integration process.
Misconception #3: Developers Shouldn’t Focus on Performance Until After Functionality Is Complete
One of the core tenets of agile programming is that problems found early are fixed faster and at a far lower costs. That’s exactly why you see trends like test-driven development, and test automation, and why more and more testers are learning how to code, so they can create tests alongside creating code.
It’s no different with performance testing. How many times have you heard the story – an enormous bottleneck was found in the field, causing a huge slowdown and impacting revenue. When the root cause was finally found, it came down to one poorly optimized line of code or a badly written SQL statement. Wouldn’t it have been nice to find that error when it was written, and not after users were affected?
Back-end interfaces like SOAP or Web Services open up all sorts of possibilities for testing performance along a variety of application paths before the user interface is fully built out. Take advantage of this and you’ll find you can improve performance well before your app’s functionality is done.
Misconception #4: Performance Can’t Be Accurately Measured While Code Is Under Development, so Why Bother?
It’s true that the performance characteristics of code that is actively being developed will change quite frequently. As code is built out, it becomes more and more complex, and that’s going to directly impact how fast and efficiently it runs.
But that’s all the more reason to design performance tests early in the process. By doing so, you’re going to help developers be aware of their code’s behavior under load or stress, and they’ll even be more conscious throughout the process of the decisions they make that could affect performance.
Misconception #5: Load Testing Doesn’t Involve the Whole Team Like Functional Testing Does
Well, the truth is that while performance testing may have historically been the responsibility of a lone individual or a small, distinct department, that’s a pretty antiquated way of looking at load testing. Plus, it flies in the face of everything that Agile stands for.
If you look at any modern Agile organization, you’ll see that everyone is responsible for quality. Everyone plays a role in maintaining working software (as the Agile Manifesto says). In fact, as testers you know better than anyone that while organizations still have testers and quality assurance specialists, developers are often expected to write their own test cases, and operations specialists are similarly expected to identify problems and work towards fixing them. Everyone is a tester.
Just because performance testing hasn’t been fully integrated through the team yet, doesn’t mean that it shouldn’t be.
Misconception #6: Load Testing Is Too Manual for Our Automated Continuous Integration Environment
There will always be manual aspects of load testing, just as there will always be manual aspects of functional testing. After all, at the end of the day it’s the user experience that counts. If you eliminate the human perspective completely during testing, there’s no way you can have full confidence in the code you are delivering.
Automation goes a long way, and there are plenty of ways to automate performance testing too. Saying that the process is too manual is little more than an excuse.
Now is a great time to find opportunities to make performance testing an integrated part of your Agile process. So much is changing with the tools and processes out there, it’s hard to resist the benefits you can achieve. Hopefully, this post helps you get around some of the preconceived notions that may be standing in your way.