VSTS, Visual Studio, VS2010,
buy corel draw 12 cheap flash cs4 after effects system requirements where to buy windows xp license buy pagemaker software buy flash cs3 buy streets & trips 2010 buy maya 2010 buy windows 7 pro 64 bit buy microsoft outlook 2007 product key windows 7 ultimate pricing windows 7 home premium best buy buy adobe acrobat 9 pro extended microsoft windows vista ultimate with sp2 (32bit) where to buy microsoft frontpage ms office enterprise 2007 price where can i buy cubase sx3 buy onenote online buy autocad architecture buy visual studio 2003 autocad electrical pricing buy premiere pro cs3 adobe production premium mac download adobe after effects cs4 mac corel photoimpact x3 download download adobe premiere elements 7 buy quicken 2010 premier buy contribute cs3 purchase windows vista steinberg nuendo download cheap quickbooks software purchase photoshop elements 7 buy outlook 2007 cheap after effects demo windows vista home basic iso download autocad electrical 2009 corel video studio 12 download buy vista business upgrade nuendo 4 price quicken 2010 pricing buy quicken 2010 deluxe download adobe dreamweaver cs3 buy expression studio 3 buy windows xp license online adobe premiere pro cs4 download buy autocad lt autodesk mechanical desktop 2009 download windows datacenter license cost cheap windows vista ultimate autocad 3ds max 2009 buy visio 2002 norton 360 price comparison purchase windows 7 business buy windows vista home premium 64 bit encarta premium 2009 download ms works download microsoft office 2003 best buy download font folio 11 buy onenote 2007 buy wordperfect 11 buy microsoft money 2006 windows 7 ultimate oem pricing buy windows vista business 32 bit cheap illustrator cs3 autodesk lustre buy buy microsoft project 2000 adobe premiere pro cs3 torrent buy windows 7 home premium full version buy microsoft office 2003 download buy windows 7 pro 64 buy powerpoint 2007 only buy vista ultimate online windows 7 ultimate 64 bit price download adobe after effects cs3 adobe dreamweaver cs4 discount windows 7 cost too much buy autocad architecture 2010 buy adobe contribute mac purchase microsoft office 2003 professional corel draw x4 download buy visual studio 2008 license excel 2003 price cheapest windows 7 ultimate buy windows 2008 datacenter adobe cs3 master download buy adobe flash 8 windows xp sp3 iso buy windows vista ultimate cheap adobe illustrator cs2 download cheap autocad 2009 software buy vista premium buy photoimpact x3 adobe acrobat 9 oem buy cs4 dreamweaver adobe soundbooth cs4 download buy microsoft streets and trips 2009 autocad 2010 system requirements 3ds max design price buy microsoft outlook 2007 only buy microsoft sql server 2008 zonealarm antivirus 8 torrent download indesign for mac windows datacenter 2008 licensing autodesk 3ds max design price buy presenter buy 3ds max cheap buy autocad 2010 lt buy powerpoint 2003 online buy microsoft office 2003 student ms visio 2007 price cheapest windows 7 ultimate oem buy excel 2003 online symantec pcanywhere download buy maya 2009 unlimited cheap access 2007 buy office 2003 cheap adobe dreamweaver sale download streets and trips 2009 dreamweaver mac trial corel draw x4 discount cheap indesign cs3 navisworks price cubase 4 download buy mappoint 2006 download adobe illustrator cs2 autodesk lustre pricing after effects mac demo buy office 2008 download windows vista download iso adobe framemaker price microsoft excel 2003 download indesign software download windows 2008 server pricing download autosketch 10 adobe after effects mac download pcanywhere pricing buy vista home premium oem windows 2008 standard r2 64 bit windows 7 professional buy ms office 2003 pro master collection cs4 system requirements buy dreamweaver cs4 mac buy norton 360 v3 microsoft works download microsoft office 2008 discount buy cubase 5 dongle buy microsoft access 2003 download buy windows 7 student windows 7 ultimate sale price buy adobe flash for mac buy microsoft word 2007 download download cubase 5 full cheap windows 7 professional buy windows 7 ultimate 64 bit buy photoshop elements 7 cheap windows 7 professional oem pricing buy symantec ghost buy adobe flash mac download 3ds max design 2009 autocad inventor lt suite 2010 cheap powerpoint software buy adobe illustrator student windows 2003 enterprise license cost maya price 2009 cheapest norton 360 3.0 buy adobe audition 2.0 windows 7 pro sale download microsoft office 2003 professional edition buy autocad electrical cheap buy adobe photoshop for mac purchase windows vista online buy windows 7 home premium retail buy wavelab microsoft mappoint europe 2004 buy microsoft office product key download microsoft digital image suite 2006 corel software for mac purchase quickbooks buy visual studio 2008 standard how to get photoshop for cheap 3ds max pricing how to buy powerpoint 2003 buy adobe flash player 10 adobe cs4 for mac download autocad inventor professional suite 2010 download wavelab 6 buy windows 7 license corel draw mac version adobe robohelp 8 download adobe after effects cs3 price download wavelab windows 2003 datacenter edition adobe contribute cs3 download microsoft money 2007 home & business windows xp price best buy price windows 7 ultimate buy cubase sx3 cheap autocad 2009 cubase 5 buy online autodesk autosketch price where to buy adobe premiere pro cs3 dreamweaver mac oem buy photoshop elements buy visual studio 2008 windows 7 ultimate 64 bit best price windows 7 ultimate purchase adobe indesign cs3 cheap adobe creative suite 4 master collection download buy quickbooks pro 2010 windows 7 ultimate 64 bit iso download illustrator for mac windows vista cheapest price font folio 11 download purchase windows vista ultimate key quickbooks enterprise pricing download turbotax 2008 premier adobe cs4 web premium for mac windows xp buy cheap cheap windows xp os buy inventor 2009 buy access 2003 software turbotax pricing buy microsoft windows 7 home premium buy vista home premium product key microsoft encarta premium 2009 dvd microsoft digital image suite 2006 download buy autocad mechanical 2009 windows 7 pro cheapest price buy windows vista 32 bit cubase 4 cost download corel draw 10 framemaker download microsoft works 9 download download adobe illustrator cs4 adobe creative suite 4 web premium download how to buy windows 7 64 bit download streets and trips 2007 windows vista business 64 bit sp2 adobe after effects cs3 for mac dreamweaver mac cs4 windows 7 64 bit best price vista 64 bit buy buy framemaker adobe photoshop best price buy powerpoint only windows vista home premium download how much does microsoft works cost download adobe premiere pro cs3 windows 7 pro 64 bit price buy adobe premiere pro for mac adobe acrobat prices buy windows 7 starter windows 2008 server purchase buy adobe creative suite 3 master collection autodesk maya 2009 price painter x for mac quickbooks enterprise 9.0 download download soundbooth cs4 download quickbooks premier 2007 buy windows xp sp3 professional buy office 2008 for mac product key cheap acrobat 9 disable norton 360 buy lightroom 2.5 cs4 master collection download buy office cheap download microsoft office 2010 buy access 2007 online windows 7 home premium cheapest price purchase vista upgrade adobe cs4 mac price cs3 production premium mac buy powerpoint download cheap windows 7 ultimate retail cheap windows 7 ultimate key buy photoshop lightroom 2 windows xp cheap price norton ghost 12 activation key cheap adobe premiere pro cs4 autosketch 9 download adobe pagemaker price windows 7 pro cheapest microsoft office 2003 best price turbotax deluxe 2009 price cheap windows 7 oem adobe dreamweaver cs3 download microsoft onenote price download adobe soundbooth cs4 adobe illustrator 10 download buy office onenote 2007 corel for mac download adobe suite cs3 price purchase windows 7 ultimate key windows 2008 datacenter cost buy windows 7 64 bit oem microsoft visio 2007 pro adobe contribute trial buy quickbooks pro 2009 buy microsoft office 2010 windows 7 pro 64 bit download adobe indesign cs4 windows full version download after effects cs4 buy adobe after effects cs3 download cs3 design premium cheap windows 7 ultimate download microsoft word 2007 download full version ms streets and trips 2008 download adobe photoshop cs4 extended mac download windows 7 home premium sale buy ms powerpoint windows 7 buy download how to buy windows vista product key buy autocad cheap vista business cheap buy sql server 2008 enterprise edition windows 7 buy license buy ms works microsoft visio 2007 prices buy autosketch 9 buy turbotax 2006 download adobe contribute cs4 windows vista ultimate best buy microsoft windows 7 professional 64-bit oem get adobe premiere pro cs3 discount microsoft office 2003 autodesk architecture 2009 windows 7 ultimate cost buy photoshop cs3 quickbooks enterprise 9.0 price buy after effects cs4 mac purchase windows vista download buy acrobat professional 9 autodesk lustre 2010 price buy vista get windows 7 buy windows 7 home premium cheap windows 7 64 bit discount adobe pagemaker buy buy ms access 2003 illustrator download cs3 autodesk 3ds max design 2010 download cheap windows 7 for students download autocad electrical download inventor lt 2010 quicken rental property manager 2010 adobe contribute cs4 mac price buy windows xp with sp2 windows 7 pro 64 bit oem purchase vista online windows 7 ultimate licensing adobe flash cs4 buy adobe illustrator cs3 direct download

Practical Process Improvement (Part 5)

By Jeff Levinson • on December 26, 2008

The first four posts (Part 1, Part 2, Part 3, Part 4) dealt with working through a process for handling bugs and improving that process. But what about preventing bugs to begin with? In this part I’ll talk about some preventative measures to help eliminate bugs at the requirements and development phase.

Let’s start with functional bugs. These are the bugs that really shouldn’t be in applications. Now, I am a realist and I understand that it is impractical to try to eliminate all bugs (you can do it but at what cost?) in most applications. This does not hold true for life-critical applications in which there is no margin for error. However, how do you eliminate all of the functional bugs? Testers are not the way to eliminate bugs. If a bug gets to the testing stage you’ve already introduced waste. You want to ensure that before the software gets to the testers, that there are no bugs.

Note: In Lean theory, there would be no testers (or “inspectors”) because all they would be doing is finding a problem that shouldn’t have been introduced in the first place. But in software development I believe this is impractical in most cases.

Let me pose this question to you (this is more applicable if you are a developer but if you aren’t, put yourself in the developers’ shoes): How does a developer know when they are done writing code?

Seems like a simple question, right? I commonly get five answers when I ask this question:

  1. You’re never done coding a requirement, it’s an ongoing, evolving process with no end in sight.
  2. When my code does what the requirement says it should do.
  3. You’re done when the analyst says you’re done.
  4. You’re done when all of the unit tests pass.
  5. You’re done on the day the code is due.

The fourth answer is usually from groups doing Test Driven Development or heavy unit testing in a true agile process such as Extreme Programming (XP). I’ll address questions about methodology later in this book.

Looking at answers 1, 2, 3 and 5 you can almost feel the depression. Certainly answer number 1 is depressing – essentially you never finish and you can never know when you’re finished. Answer 5 means that the developer feels that maybe they don’t get the time to finish the way they would like to – again, depressing. Answers 2 and 3 are essentially the same (you hope anyway) but there is a major problem. As I’ve noted already, requirements are subjective which means that while you think you’re done you probably aren’t done.

Test Cases before Code

A better answer is: “I’m done when all of the test cases for this requirement pass.” Now this presents some problems. First, most organizations do not create test cases at the same time as they create requirements. Second, those organizations that do create test cases at this stage do not create repeatable test cases (a.k.a. flimsy test cases). Finally, I have not worked with any organizations that require the users to sign off on test cases the same way they have to sign off on requirements. It kind of doesn’t make sense does it? To have customers sign off on documents which are mostly vague but not have the customers sign off on documents that provide definitive proof that a requirement has been met.

So then, the solution to this problem is simple, assign testers to work with analysts and write test cases for requirements before the requirements are handed to developers. Sounds simple, right? This is where a cost justification comes in. You need additional resources earlier in the process which will save costs later in the process. It’s hard to prove a negative to management and get the appropriate resources and funding.

Another issue with this simple solution is that depending on the type of methodology you are using, it may be difficult to break people of old habits. The manners in which requirements are documented make a huge difference in the ease of creating related test cases. For instance, the best format (let me qualify this – in my opinion) for requirements in relationship to test cases are use cases. A sample use case is shown in the table below.

ID: UC-POS-01
Title: Enter Merchandise
Created By: Jeff Levinson
Date Created: 7/19/2007
Last Updated By:
Date Last Updated:
Actors: Salesperson
Description: The salesperson enters items into the POS system
Trigger: Customer wants to check out
Preconditions: None
Postconditions: The POS system has a list of items for purchase by the customer and displays the total that the customer owes.
Normal Path:
  1. Salesperson logs onto the system
  2. System verifies identity
  3. Salesperson elects to ring up a new purchase
  4. System displays the new purchase screen
  5. Salesperson scans the item barcode
  6. System displays the items
    1. Title
    2. Description
    3. Price
  7. [Repeat steps 5 and 6 until order is complete]
  8. Salesperson completes the order
  9. System displays the total cost of all items, including sales tax
Alternative Path: A1: Invalid logon
[Branch at Step 1]

  1. System notifies user that the logon attempt failed
  2. User retries to log onto the system

[After three tries the user is logged out and needs a manager to re-enable their logon]
[Resume at Step 2 if logon successful]

A2: The item does not have a barcode
[Branch at Step 5]

  1. Salesperson manually enters the UPC code into the system

[Resume at Step 5]

A3: The item is not found
[Branch at Step 5]

  1. Salesperson enters the UPC code
  2. System prompts the Salesperson for the following:
    1. Actual UPC code of the item
    2. Item title
    3. Item price
  3. Salesperson enters the appropriate information

[Resume at Step 7]

Exceptions: None
Frequency of Use: Approx. 100 times per day.
Notes: None

While you can probably find lots of other situations, alternate paths and exception paths, this serves as a good example for entering items you may find at any retail store.

The reason why use cases are the best starting point for test cases is because they already describe the interaction between the user and the system so you know what the user is supposed to be providing and you know what information the system is supposed to be responding with.

If you are using a methodology such as Scrum which advocates user stories there may be some difficulties. Not because there is anything inherently wrong with user stories, but you can’t write code from a user story. User stories are designed to note a high level requirement and describe the users’ use of the functionality to provide perspective and context for the developers. What many forget to do is to provide more detailed requirements (which can be in the form of use cases) which can form the basis of test cases (if you are going to write use cases based off of user stories, then the description would be the user story). In other circumstances there is no formal method for writing requirements documents which means the structure of each document is entirely up to the analyst who writes the requirements.

Let’s look at a sample test case which tests the use case in the table above.

Step # Action Expected Result
1 Log onto the system System displays the main menu screen
2 Select the new sale menu item System displays the new purchase screen
3 Scan an item barcode System displays the item information

HOLD EVERYTHING! What’s wrong with this test case (besides that it isn’t complete)? This is the typical test case that I see when I work with customers all of the time. If you are a professional tester reading this you know the answer to this: This test case is not repeatable. Believe it or not, I have had to disabuse people of the notion that this type of test case is a good test case. But let’s see what the problem is here. In step 1 I log on as the user. Well, what user? It assumes that the logon was successful so that means I need to log on with a valid user. What user though? This is a test system and will hopefully not have production values in it. In step 3 I’m supposed to scan a barcode for the test. What barcode? Can I use the paperback book I’m reading at lunch for this purpose or maybe the barcode from the candy bar that I bought for lunch? Again, the system is supposed to display the appropriate information which assumes I’ve picked an item actually in the inventory. This makes for a poor testing and a poor coding experience. Let’s try this test case again.

Step # Action Expected Result
1 Log onto the system with username: Jeff and password: P@ssw0rd System displays the main menu screen
2 Select the New Purchase menu item by pressing “A” System displays the new purchase screen
3 Scan the book barcode “Gone with the Wind” (ISBN: 1416548890) System displays:
- Gone With The Wind
- A southern love story
- 11.55
4 Press the Total button System displays the subtotal as 11.55, Sales Tax as 8.25% and the total as 12.50

Now this is almost a repeatable test case. What’s missing? There really is only one thing missing here (there are a few minor things but I’m sticking with the major issues) – the setup. How does the system know the tax amount is 8.25%? It can be different depending on where the machine is located. Test cases need to included necessary infrastructure setup and in this case the test would have to be run with different sales tax amounts (or no sales tax amount if we want to assume that maybe this is being used for internet sales in some cases).

In order to have a complete battery of tests this test case would have to be repeated with numerous different values. How many different scenarios do you test? What are the likelihood of the different scenarios occurring and what is the cost if they do occur and the software fails. In the above example, one may assume that you could simply ignore the situation in which the item isn’t found in inventory. After all, if the item is on the store shelf it had to have been received and if it was received it was scanned into inventory. Maybe the chance of this occurring is very, very low but what if it does occur? Without being able to manually enter the item you would not be able to sell the item to the customer. So the cost of this mistake is the amount of the item plus some of the stores reputation. This may be too high a price. It is critical to understand the importance of each of the scenarios when making the decision of what to test.

Well, why don’t we just test everything? The short answer is that it isn’t feasible (again, this does not apply to life-critical applications but it does apply to virtually everything else). The cost in time, resources and equipment to test everything has to be balanced against the ROI. I believe it is possible to make error free applications but at what cost? If it costs 10,000 to test every aspect of the alternate paths but those only become a reality once every 5,000 sales for low dollar amounts, does it provide a benefit? The answer is probably not. As with almost everything else, use the 80/20 rule. That is, 80% of the usage of your application is going to involve 20% of the code (we write an enormous amount of code to handle exception paths and alternate situations). Test that 20% of the code 100%. The other 80% of the code can be tested as problems are discovered or as time permits.

Now that you have a series of good test cases which concretely detail what the system must do, a developer can now answer the question, “When do you know you are done coding?” The answer is, “When the functional test cases I was provided pass.” This is the only right answer (but not usually the one the developers can use).

Comments

Trackbacks

Leave a Comment

You must be logged in to post a comment.