TrainingConferencesAbout UsContact UsAdvertiseSQE.comRSS Feed

StickyMinds.com: brain food for building better software

Log In
 Clarify Your Search Criteria

Tips on Using Our Search Feature(s)
 
StickyMinds.com Home
ResourcesTopicsCommunityPowerPassBlogs
Home  >  Detail: An Uncomfortable Truth about Agile Testing



A StickyMinds.com Original
Article Picture
An Uncomfortable Truth about Agile Testing

By Jeff Patton

Send This Content to a FriendGet a Short Link to This ContentPrint This ContentSee User Comments About This Content

Summary: For the past eight years, Jeff Patton has been practicing agile software development. One characteristic of agile development is continuous involvement from testers throughout the process. Testers have a hard and busy job. And in the last year, Jeff has finally starting to understand why testing in agile development is fundamentally different.


Sonata Software
In organizations that have adopted agile development, I often see a bit of a culture clash with testers and the rest of the staff. Testers will ask for product specifications that they can test against to verify that what was built meets the specifications, which is a reasonable thing to ask for. The team often has a user story and some acceptance criteria in which any good tester can quickly poke holes. "You can't release the software like this," the tester might say. "You don't have enough validation on these fields here. And what should happen if we put large amounts of data in this?"

"This is just the first story," I'd say. “"We'll have more stories later that will add validation and set limits on those fields. And, to be honest, those fields may change after we demonstrate the software to the customer--that's why we're deferring adding those things now."

"Well, then there's no point in testing now," the testers would usually say. "If the code changes, I'll just need to re-test all this stuff anyway. Call me when things stop changing."

I can understand their concern, but I also know we need to test what we've built so far--even if it's incomplete, even if it will change. That's when I realized what testing is about in agile development. Let me illustrate with a story:

Imagine you're working in a factory that makes cars. You're the test driver, testing the cars as they come off the assembly line. You drive them through an obstacle course and around a track at high speed, and then you certify them as ready to buy. You wear black leather gloves and sunglasses. (I'm sure it doesn't work that way, but humor me for a minute.)

For the last week, work has been a bit of a pain. When you start up your fifteenth car of the day, it runs rough and then dies after you drive it one hundred yards from the back door of the plant. You know it's the fuel pump again, because the last five defective cars you've found have all had bad fuel pumps. You reject the car and send it back to have the problem properly diagnosed and fixed. You may test this car again tomorrow.

Now, some of you might be thinking, "Why don't they test those fuel pumps before they put them into the cars?" And you're right, that would be a good idea. In the real world, they probably test every car part along the way before it gets assembled. In the end, they'll still test the finished car. Testing the parts of the car improves the quality downstream, all the way to when the car is finally finished.

Testing in agile development is done for much the same reason. A tester on an agile team may test a screen that's half finished, missing some validation, or missing some fields. It's incomplete--only one part of the software--but testing it in this incomplete stage helps reduce the risk of failures downstream. It's not about certifying that the software is done, complete, or fit to ship. To do that, we'd need to drive the "whole car," which we'll do when the whole car is complete.

By building part of the software and demonstrating that it works, we're able to complete one of the most difficult types of testing: validation.

I can't remember when I first heard the words verification and validation. It seemed like such nonsense to me; the two words sounded like synonyms. Now I know the distinction, which is important. Verification means it conforms to specification; in other words, the software does what you said it would do without failing. Validation means that the software is fit for use, that it accomplishes its intended purpose. Ultimately, the software has no value unless it accomplishes its intended purpose, which is a difficult thing to assure until you actually use it for its intended purpose. The best person qualified to validate the software is a person who would eventually use it. Even if the target users can't tell me conclusively that it will meet its intended purpose, they often can tell me if it won't, as well as what I might change to be more certain that it will meet its intended purpose.

Building software in small pieces and vetting those pieces early allows us to begin to validate sooner. Inevitably, this sort of validation results in changes to the software. Change comes a bit at a time, or it arrives continuously throughout an agile development process, which agile people believe is better than getting it all at once in a big glut at the end of the project, when time is tight and tensions are high.

Being a tester in an agile environment is about improving the quality of the product before it's complete. It also means becoming an integrated and important part of the development team. They help ensure the software--each little bit that's complete--is verified before its users validate it. Testers are involved early to help describe acceptance criteria before the product is written. Their experience is valuable to finding issues that likely will cause validation issues with customers.

At the end of the day, an agile tester likely will pour over the same functionality many times to verify it as additional parts are added or changed. A typical agile product should see more test time than its non-agile counterpart. The uncomfortable truth for testers in agile development is that all of this involves hard work and a fair amount of retesting the same functionality over and over again. In my eyes, this makes the tester’s role more relied on and critical than ever.


About the Author
Jeff Patton leads teams of Agile developers to build the best software possible. He proudly works at ThoughtWorks. Jeff's series of columns on software design and pre-design tips appears regularly on StickyMinds.com. Among Jeff's accomplishments, he can add winning the 2007 Gordon Pask Award, which he received at the Agile2007 Conference in August. Jeff's blog, presentations, and other articles can be found at www.agileproductdesign.com.

Back to Top
 

StickyMinds.com Weekly Column From 3/10/2008 

Member Comments
Add Your CommentExpand Comments
 
Comment:    
by Emi Dungia 11/23/2009

Agile testing is not only great but a necessity whether one is using a waterfall or iterative development approach. However, it is key that not only the testing team gets involved early on in the project but that developers test their code themselves using tools which testers do not necessarily have access to and/or are skilled to use as efficiently to pinpoint defects root causes. If the corporate culture does not support development testing, another option might be to involve test automation specialists instead of manual testers which "professional language" is closer to that of programmers and can therefore increase the much needed...Read On

 
 
Comment:    
by Sushma Mudigonda 2/26/2009

Thanks for the article. I have few questions:
- What kind of testing do we do and when would that start. I am thinking, we will have to do just Functional testing (or is it adhoc testing) in the beginning and leave system testing and regression testing to later sprints/iterations. Am I right?
- What best practices can I use (such as run a parallel regression cycle while another tester testing the day to day changes)
- When do we start authoring of manual testcases? Along with coding for the same set of User stories?
- How do I define when to stop testing ?
- What would my test report contain?

I am not sure...Read On

 
 
Comment:    
by Tonya Weatherton 6/3/2008

I keep hearing people comment that they are "Testing an incomplete part" and I'd like to reiterate what the author said in a past comment, If you have user stories that actually deliver value to the users (what they are supposed to do), then there is no such thing as an incomplete part. I think it's hard for analysts to move out of the "test everything at the end" mode and in to the "test small chunks during the lifecylce" realm. I've been on agile projects that worked and those that just were diasters! The difference was communication and dedication by ALL players.

 
 
Comment:    
by G Quality 5/14/2008

Great article and focus on testing in the agile realm. I'd say the one thing I've had the most difficult time with as an Agile QA is when and where to use automation. I am a big fan of tools such as FIT, Selenum and QTIQ and feel they really get to the heart of Agile, which is to foster an environment of open and honest communication across the entire project team. When these tools can be used, meaning the customer has the time to be fully engaged in the creation of tests at the initial stages, it proves to provide a higher level of quality almost all the time.
The problem I face is our customer does not have the time to commit to...Read On

 
 
Comment:    
by Marjie Carmen 5/14/2008

Great article and very timely. I just did a small workshop on Validation and Verification and it was confusing to many people and yes, this point is frustrating to testers and misunderstood to management. Management thought agile meant faster and testers sometimes wonder why they have to test over and over and over again sometimes. Of course, there are time constraints. Overall, we're producing products with less defects following VERY loose agile but it's a tough transition over to this new way of working and I agree, it does seem that the testers have a much more visible and important role in agile methodologies..

 
 
Comment:    
by Michael Bolton 5/14/2008

By the volume of the comments, this is clearly a provocative article. Good. :)

I'd like to suggest a few things. First, I would seriously question a tester who responded to the situation in the way that Jeff indicated ("Well, then there's no point in testing now...If the code changes, I'll just need to re-test all this stuff anyway. Call me when things stop changing.") Do things /ever/ stop changing? Our job, as I see it, is to provide information about the product to the project community. The state of the product might change some of the choices we make, the things we report, and the ways in which we report them, but...Read On

 
 
Comment:    
by Fred Huse 5/14/2008

In my agile environment as a tester, I'm involved at the beginning of the process and that's the sprint planning meeting and creating the stories. When a story is created, I am involved to define my testing task just like the developers are when they define their task. As I write my acceptance criteria down, I get to ask specifically what the story will accomplish, what field validation is included, how many characters will this field be limited to etc. This activity drills down to define the story and fleshes out requirements that otherwise might not have been thought of. These requirements are then input into FitNesse for unit testing and...Read On

 
 
Comment:    
by Susan Thompson 5/14/2008

Great article. We are struggling with convincing management and our sales team that it takes a good deal of testing to use agile. Sale still won't give us more than 30%-35% of the project time and we're struggling. Every little bit of confirmation helps.

Author's Response:
5/14/2008    
I wish out could change the agile myth that agile means no testing or less testing. In fact I find that it takes much more testing than traditional development, and more planning work on the front end as well. By more I mean more time all together not generally more time in a single sitting. Instead of a large planning or requirements phase, it's dealt with incrementally throughout the development of the product. Instead of a large testing phase, it to is dealt with incrementally throughout the life of the product. When out add up all the time testers or business analysts spend in agile, it's usually more than they used to spend in a waterfall style approach.

Thanks for your comment.

 
 
Comment:    
by Domenico Savino 5/14/2008

In my experience Agile projects have placed an enormous amount pressure and stress on the testers/users of our system. They are expected to give requirements, test the system , asnwer all IT questions on how something should and support change management activities. We do test over and over again. With each iteration we risk that something is missed.

It seems to me that agile is almost absolving programmers of resposnibility to test and deliver quality in their program. After spending years on my team coaching staff into thinking about testing in business terms they are now faced with the responibility of comming up with what I...Read On

 
 
Comment:    
by Robert Flatters 3/24/2008

Agile is ok if it correctly run.....the reason i say this is that i have worked in a agile environment where it has not worked, due in part to bad communication, which is one of agile key cornerstone, and issue with company changing requirements and documentations that was missing details that came to light during demonstration to the business.

If i ever get the chance to do an agile project again i will better prepared.

 
 
Comment:    
by Surya Pratap 3/20/2008

Somehow, I have a difference of opinion here. I believe Agile Testing should be used when for the smaller modules, more or less everything has been frozen as far as development is concerned. If I am being asked to test a module and then being told that "this" functionality will be working on coming Tuesday and "that" functionality is being decided upon whether to implement or not; but meanwhile you test this module and let us know how its working. With no offence to anyone, I would rather pack my stuff and go to Afghanistan (Life would be still better).

 
 
Comment:    
by Wayne Mack 3/17/2008

I would like to extend Rahul Kumar's comment and note that testing needs to be involved in the iteration planning and not just accept a list of stories from development. The intent of agile is to eliminate waterfall-style hand-offs.

In the example given by the author, testing, development, and the product owner should all participate in the iteration planning. Testing should raise issues of field validation and other concerns. It needs to be a consensus decision among all three as to whether to include the validation or other concern as part of the user story in question. If the issue is not included, then a new story...Read On

 
 
Comment:    
by Sanjay Srinivas 3/14/2008

The whole thing about Agile is "Faster Feedback". Secondly, whether Agile or Waterfall, quality cannot be tested, it has to be built in. Which means, developers must have unit tests for their code (aka Test Driven Development - TDD). That way when code is built each time, there's "first" feedback right there to let a developer know if he/she broke anything if a unit test fails. The next level is the Black Box testing that QA / Testing can conduct. Here again, it's expected that they automate the Acceptance Criteria for each story(whatever is possible), so it can be run any number of times. This is the "second" feedback. As several iterations...Read On

 
 
Comment:    
by David Babuder 3/13/2008

This really just points to the absolute need to automate in an agile environment. You can not keep up if the testers keep filling in fields manually; you can only keep up if the fields are filled in (a) via an automated method, and (b) that is parameter driven, and (b) covers both positive and negative test results. The initial story could indicate a trivial input case if they do not know the limits - for instance, the user name is always "John Doe", and the address is always "123 Main Street", etc.
This also helps, in a legitimate way, to help people prioritize the establishment of limits before the software gets demo'd to end...Read On

 
 
Comment:    
by Rahul Kumar 3/12/2008

I would like to add that in an Agile Environment, the QA Team needs to be involved right from the "Requirements" phase and sufficient "Static Testing" should be performed. Reviews and Walkthroughs should honestly happen then only we could derive any value out of the Agile Testing process.
As the developement progresses the QA team should work very closely with the development team and tracking should be done on a daily basis at the very best.

In the absence of a close collaborative working environment, I am afraid to say that the very purpose of Agile Testing is defeated and it gets more like testing in a waterfall model,...Read On

 
 
Comment:    
by Sanjay Cholekar 3/12/2008

Agile Testing,is group testing,with developers,and most of the credit goes to developers and not the testers.Ready to build and ready to test ,which is right order?

Author's Response:
3/12/2008    
Agile development isn't one specific thing in that Agile refers to a class of processes. Specific Agile processes include Scrum, Extreme Programming, Feature Driven Development, Crystal, etc... Each one of those may say different things about testing. And, to further complicate things, most organizations blend Agile approaches. For instance these days it's common to use Scrum with many of XP's engineering practices thrown in.

I'll submit it's impossible to say that any one way of doing things is /the/ Agile way. It really is up to the agreements you put into place inside your organization.

That said, Agile development favors "whole team" thinking vs. specific roles and responsibilities. In teams I run, I usually have testers. They collaborate early to help with requirements. They test on an ongoing basis throughout a development cycle. And, when the product is nearing ship time or an important customer demo, they organize the whole team to act as testers under their supervision to get a lot of testing done quickly. That's _my_ Agile. Every organizations Agile varies.

 
 
Comment:    
by Jeff Patton 3/11/2008

For those who've read and commented so far, clearly I've hit a rich vein of both concern and constructive advice. One blanket "uncomfortable truth" about Agile development in general is that it often gets characterized based on those who do it poorly. In particular the developer or manager who doesn't value testing and testers. I'd submit that those sorts of developers that don't understand and work well with testers were just as bad at it before Agile. And, unfortunately they often use ambiguous and undefined "rules" of Agile development as excuses for bad behavior. I'd suggest using conflicts that arise out of ambiguous process about...Read On

 
 
Comment:    
by Matt Mansell 3/11/2008

You make a good case for early testing, whether agile or not. I heard another analogy recently. When Boeing set out to develop a new plane they might start with an engine. But rather than build the whole engine they may start with one of the blades for the fan. It will be thoroughly tested and stressed until all it's properties are well understood. Then they will test the fan. Again this will be thoroughly tested until all it's properties are understood.

And so it goes until the entire engine is built. Then, if there is a fault, each component is so well understood that the engine can be deconstructed and the offending...Read On

Author's Response:
3/11/2008    
What I've been noodling with lately is the idea of testing ahead of complete specifications, and as you point out, testing to help actually arrive at good specifications.

I like and really agree with what you said about saying it's ready for testing and being able to identify what should be tested. It's really critical to do this in Agile development where part of a thing is built, and it's a great waste of time to test parts that aren't built. But, sometimes what we're doing is not verifying it meets specs, but scrutinizing to see if these are the right specs - if specs should change. It's always been a responsibility of good testers to do this, but seems to be more prominent in Agile development where iterative cycles are used (or should be used) to consider feedback on what's been built.

Thanks for commenting! -Jeff

 
 
Comment:    
by Rex Parsons 3/11/2008

In my limited experience with agile development, I have found it very frustrating. The role of QA in the process has been poorly upheld. Involvement is limited, questions about functinality are often deferred until "later stories". Testing early in the process feels like something done merely to appease QA, and amounts to little more than independently performed unit tests.

To use the example from the article, testing the fuel pump before it was installed on the car would find that the fuel pump did not in fact pump any fuel. But apparently that is acceptable because the pump functionality will come later. So the only...Read On

Author's Response:
3/11/2008    
One area I've seen change in Agile development is a move towards smaller "user stories" or bits of functionality to implement - and then back again to "right sized" user stories - large enough to really do something valuable in the software.

A fuel pump that merely looks like one isn't valuable. Perhaps it's too small of a bite for testers and customers to consider - perhaps it's just a development task on the way to some reasonable sized bit of functionality. As another commenter said, it's important to be clear about what we're testing. Perhaps with something that just looks like a fuel pump, the goal might be to test that shape and size - to confirm it bolts into the car correctly. If that were the case (and I'm worried I'm trying to get too much from this metaphor) then testing the fuel pump would involving bolting it into the car and making sure it fits well, bolts in firmly, then pointing out the risk that by not actually having it pump fuel yet, that when it does pump fuel we'll need to test the stress of pumping on the "fitting and mounting" stuff we just tested.

Reiterating, it seems important to be clear about /what/ we're testing at any given point in time - and what we'll do with what we learn. If it fails tests do we send it back to development to rework it? Or, do we send comment on specifications back to customers to rework those? And, what do we do with "risks" that result from things not yet tested? These all seem like outcomes of incrementally testing.

 
 
Comment:    
by Terry Morrish 3/11/2008

I'm disappointed. You speak of verificiation and validation but you have narrowed the scope of what QA does to exploritory/black box testing. You have limited the role of QA rather than expanded it to where it should be. Without documentation QA had better be involved in the process from the beginning, yet this very rarely occurs to the extent that allows your idea to work.

Now a days, companies very rarely do anything but agile development, they race to get their products out the door. Even at these break neck speeds any product without without documentation as to what the system does(requirements,design etc) than what is there...Read On

Author's Response:
3/11/2008    
It certainly wasn't my intent to limit the role. I personally advocate for and coach teams to have QA involved early - at minimum before each and every Agile "story" goes into development.

And regarding your points on documentation, the tricky thing for me has been /when/ we need comprehensive documentation. It's often most critical after the system is built - not before. It's what we leave behind for other to learn the system. As the system is emerging, specifications seem to change as we learn about the system we're building. I'm sure we've all worked in environments where the only available technical documentation was the stuff written before the software was built - the stuff that doesn't match the way it was built.

Thanks for your comments.

 
 
Comment:    
by Rick Webster 3/11/2008

Unfortunately, most "agile" development teams do not practice "agile" development at all. In order for QA to fit into an agile environment, there has to be daily communication; and this seems to be the downfall with most agile organizations. The teams may still have daily meetings, but without open and honest communication the work of testing products coming from an agile development team is frustrating, and typically falls into a waterfall methodology towards the end of the cycle, when bugs are being fixed.

There are other issues with inserting QA into agile development. I can't remember the number of times I've heard "Why are...Read On

 
 
Comment:    
by Payson Hall 3/11/2008

You offer an interesting perspective - but doesn't this bring up the question of what is the point of testing? I always look for testers to try and break the code while also verifying that it performs its desired function.

You appear to suggest that this job is not happening, or is deferred. As an earlier comment suggested - I would worry that by not capturing these defects it would be easy to forget them, and also easy to continue making the same mistake. In your car analogy, you suggest catching defects early is more efficient. You appear to suggest that Agile development/testing is inefficient in this regard. Is that your...Read On

Author's Response:
3/11/2008    
Agile development without involvement of testers is often inefficient at identifying problems early. The tricky thing about bits of functionality in Agile development is that they may be bits of finished functionality in the system, and/or they may be bits of functionality built to learn more about the requirements. The difficult part for testers is: 1. they're always "bits" and 2. it's not always clear whether the requirements will change after the functionality is validated.

 
 
Comment:    
by Kevin Kapell 3/11/2008

While I have not been involved in Agile development I have been testing for over 20 years and can see both the benifit of testing early without a completed product and requirements and some pitfalls. For instance, continueing with your example of not having enough validation for certain fields. What can happen often in this instance is the field validation gets put off for so long that peopel get used to avoiding the issue and the validation never gets added. Both the development team forgets and the tester can forget as well. This is were either requirements for field validation come in or documenting the lack of validation in bug reports...Read On

Author's Response:
3/11/2008    
You're right that in Agile development (or any development for that matter) omitted specifications caught by testers needs to be managed. In healthy Agile projects, the additional specifications show up as additional stories to manage and add incrementally to the product. On the bright side, I've seen in many Agile projects that the very frequent inspection of the software by testers and other stakeholders results in a lower likelihood (in my experience) of these sorts of things getting completely forgotten.

Omitting specs in other types of development is often seen as an error, where in Agile development it's an intentional strategy. This makes managing specifications all the more challenging. Analysts and others on that side have a difficult job as well. ;-)

Thanks for your comment.


 
 
Comment:    
by Peter Hawkins 3/11/2008

Hi,

Irrespective of whether your project is agile, waterfall, reiterative or send it up the flag pole to see who salutes, testing is always hard work, and a fair amount of re-testing. That is the nature of what we do and should not be an unfortunate truth! My experience with agile is not that I have to test incomplete components but that the developers cannot articulate clearly as to what is actually testable, what we can identify as expected outcomes and what is acceptable! It is frustrating when you are expected to test something that is not in a state that can be meaningfully tested. If you want just confirm that it dosen't...Read On

 
 
Comment:    
by Peter Hawkins 3/11/2008

Hi,

Irrespective of whether your project is agile, waterfall, reiterative or send it up the flag pole to see who salutes, testing is always hard work, and a fair amount of re-testing. That is the nature of what we do and should not be an unfortunate truth! My experience with agile is not that I have to test incomplete components but that the developers cannot articulate clearly as to what is actually testable, what we can identify as expected outcomes and what is acceptable! It is frustrating when you are expected to test something that is not in a state that can be meaningfully tested. If you want to just confirm that it dosen't...Read On

 
 
Comment:    
by Sanat Sharma 3/10/2008

Agile Testing is definitely a team work. If there is good communication between the teams, then only the product will get a good quality using Agile Testing. I personally like the car example. In Agile Testing techniques, one can use the bottom-up (or rather top-down) testing techniques to identify the bugs in the initial stage of the product. One of the core principle of testing is to prevent the bugs and I think in agile environment, we should be more aligned towards this principle.

-- Sanat Sharma

 
Back to Top



 
Ads By Google
What's This?
 
 



Home   |   Resources   |   Topics   |   Community   |   PowerPass



© 2010 StickyMinds.com. All rights reserved.
StickyMinds.com is a division of Software Quality Engineering.
Privacy Policy    Terms & Conditions    Link to StickyMinds.com    Feedback


Sonata Software

HP Software




STAREAST 2010 


Better Software Conference