BIO PRESENTATION PAPER Better Software Conference & EXPO September 27-30, 2004 San Jose, CA USA
T18
September 30, 2004 11:30 AM
REFINING REQUIREMENTS WITH TEST CASES
Tanya Martin-McClellan Texas Mutual Insurance Company
T18 September 30, 2004 11:30 AM R EFINING R EQUIREMENTS WITH T EST C - - PDF document
BIO PRESENTATION PAPER T18 September 30, 2004 11:30 AM R EFINING R EQUIREMENTS WITH T EST C ASES Tanya Martin-McClellan Texas Mutual Insurance Company Better Software Conference & EXPO September 27-30, 2004 San Jose, CA USA Tanya
BIO PRESENTATION PAPER Better Software Conference & EXPO September 27-30, 2004 San Jose, CA USA
September 30, 2004 11:30 AM
Tanya Martin-McClellan Texas Mutual Insurance Company
Tanya Martin-McClellan
Tanya Martin-McClellan is a Senior QA Specialist with Texas Mutual Insurance
project manager, product designer, technical support, and trainer. In those roles, she has seen just about everything that can go wrong do so. She collects requirements horror stories for entertainment and moral support. ☺ In her spare time, she blogs on LiveJournal as “happytester” and plays Dance Dance Revolution. Contact information: (512) 505-6275 tmartinm@texasmutual.com 221 W 6th St Ste 300 Austin, TX 78701.
Project Begins Requirements Agreed on Construction Testing Project Ends Design and Prototype Simplified waterfall methodology for reference
Y’all stop by and see me when you’re in Austin, y’hear?
Generic Test Case List DRAFT 1
Application can be installed
2
Application can be reinstalled
3
Application can be uninstalled
4
Application can be upgraded
5
Closing the session unlocks all locked records
6
More than one user may not update the same record at the same time
7
No unexpected crashes/environment is stable
8
No unexpected error messages are displayed
9
Searching for a record does not cause a record lock
10
Session times out within N minutes
11
Sessions closed without saving/submitting records do not lock records
12
Sessions closed without saving/submitting records do not update the data source
13
User attempting to update a record that is being updated by another user receives an appropriate error message
14
Valid user can open N sessions of the application
15
Valid user can open no more than Y sessions of the application
16
Viewing a record in display mode does not cause a record lock
17
When user selects a cancel or back out option, no updates occur to the record he/she is editing
18
Audit trail can be accessed
19
Audit trail contains sufficient information to determine who changed what information in the application, and when it was done
20
Invalid login attempts are logged
21
Invalid user cannot log in
22
Repeated failed login attempts will lock out user
23
User without access to function X receives error when attempting function X
24
User without access to menu option X cannot see menu option X when logged in
25
Valid user can log in
26
Entry areas accept valid input of the expected data type when cut and pasted
27
Entry areas accept valid input of the expected data type when entered manually
28
Entry areas allow all valid values as input
29
Entry areas appropriately limit the size of inputs
30
Error message provides sufficient information to both instruct the customer on next steps and assist IT in diagnosing the cause of the error
31
Error message text matches the error situation
32
Field labels are accurate (match the fields they control)
33
Navigation options work consistently
34
No unexpected data is displayed
35
Online Help for page matches the page from which it is launched
36
Online Help launches correctly
37
Online Help matches the application from which it is launched
38
Position to option positions to the first record that matches what was entered
Environment & Configuration Security Basic functions Page 1 of 2
Generic Test Case List DRAFT 39
Search results display results that match the passed parameters
40
Values entered into entry areas is saved appropriately
41
API accepts input as documented
42
API provides output as documented
43
API handles error conditions as documented
44
“Look and feel” is consistent within the application
45
“Look and feel” of the application is consistent with other TMI products
46
Accessibility standards followed
47
Application can be navigated using only the keyboard
48
Application can be navigated using only the mouse
49
Error message text is spelled correctly
50
Error message text is understood by customer
51
Field labels are legible
52
Field labels are spelled correctly or abbreviated to generally accepted standards
53
Field labels are understood by target audience
54
Field labels clearly tie to entry areas
55
Navigation options are clearly labeled
56
Number of records displayed per page matches company standard
57
Online Help has no spelling or grammar errors
58
Online Help is business-appropriate
59
Online Help is understood by the customer
60
Users understand navigation options
Usability & Standards Page 2 of 2
a few briefly fast meaningful rapid sudden a lot by and large foundational more rarely suitable abnormal clear functional natural regular sustained abnormally colorful generally naturally regularly timely acceptable common generous neutral repeatedly to be determined accessible commonly good norm review trendy adequate comprehensible gradually normal right typical after concise idiot-proof normally robust unacceptable all confirm immediately
route unclear ample considerable important
secure undesirable any considering improper
send unimportant apparent constantly in general
several unintelligible apparently continually inadequate
short unsuitable applicable cool incidental
significant unusual appropriate correct incorrect
similar to useful as desired cute intelligible plain slightly user-friendly as needed direct intermittantly pleasant small usual as required easy to understand invalid pleasing some usually attractive easy to use large plenty sometimes valid authorize efficient legible pretty sooner or later various average enough lengthy prior to standard vibrant bad enters like proper steadily when needed before eventually little quick striking whichever brief extensive long quickly substantial wrong
Refining Requirements with Test Cases
Summary:
By writing test cases to address missing or incomplete requirements and reviewing your test plan with the project team, you can bring those requirement deficits to light and increase the chances that they will be addressed prior to the testing phase.
Learning Objectives:
Keywords: verification, requirements, test cases Other Documents Provided:
Before we start:
This presentation assumes that:
written requirements that are shared with you before or while you are designing tests. When working in a more dynamic, less formal setting, these lessons may not apply.
About requirements:
“The hardest single part of building a software system is deciding what to
No Silver Bullet: Essence and Accidents of Software Engineering, Frederick P Brooks. Addison Wesley In all of the software development methodologies I have seen, requirements gathering is near the beginning of the project, and testing is near the end. Where in the process you design your tests and review them varies. There is no single best time to refine requirements – too early, and the users don’t yet know what they need; too late, and changes can no longer be made within schedule.
Refining Requirements with Test Cases
As QA professionals, our verification of the requirements can be carried out both through the processes used by project managers and through our own test-related processes. This presentation concentrates on the latter method.
Spotting ambiguity:
When reading a requirement, sometimes you are instantly aware that the requirement is worded too ambiguously. An extreme example is the requirements I got once for a new web application. The product manager was just letting the developer do whatever he wanted and hoping a viable product would come of it, so the requirements were: “1. It has to work. 2. It has to look cool.” The only way to be more ambiguous is to have no requirements at all – which is a different problem. Usually, though, it is not as obvious when the requirements are ambiguous, especially if you have to evaluate them quickly, or you aren’t given an opportunity to ask questions when they are being created. One way to spot ambiguity in written requirements is by searching them for “weasel words.” [I have included this as a .txt file in the conference materials for your convenience.] These words or phrases, if not defined in the document, are indicators of ambiguous requirements because they indicate a desire on the part of the customer, but don’t provide necessary information to measure whether the product will meet that
who wrote the requirement is trying to capture several different situations that are handled the same way. However, if they don’t list all of the situations specifically, you may fail to test some of them, not knowing they are part of the requirement. Keep in mind that these words aren’t by themselves a sure-fire indicator of an ambiguous
consider it carefully.
systems will interact?
If not, the requirements are still ambiguous. All requirements start out that way, but our verification helps to make them less so. Finding ambiguity in requirements will improve the overall quality of the end product and help keep the project on track, but the most serious requirement issues I have seen have not been simple ambiguity – those have been marked by requirements that are completely missing.
Spotting unaddressed requirement issues:
Refining Requirements with Test Cases
How often has this happened to you?
was promised at the beginning of the project. He refuses to sign off until feature X is put in, and there’s no longer enough time for regression testing if it’s added.
there is another business unit who will be affected by the project. That business unit hasn’t been involved in the project, but the project leader wants them to be included in customer acceptance “to give them a feel for how it will work.” During customer acceptance, the new business unit has no idea what’s going on. They want the project halted until they determine how they will have to change their processes to accommodate the changes to their workflow, or the project can go ahead, but must be temporarily disabled to keep the changes from occurring.
doesn’t have time to rework the design. No one makes any public statements about the changes, so you aren’t sure when you get the product for testing whether you’re getting the product the security expert wanted, or whether it is what you were expecting before she got involved.
usability test. You get the test results, but no one knows what, if anything, to do about them.
performance testing. You get the test results, but no one knows what, if anything, to do about them.
they ask, “What do we do when we need to fix user data on the fly?” You suddenly realize that, even though that’s something that gets done all the time in the old application, no one built a safe and easy way to do it in the new application. All of these are examples of missed requirements.
customer, and they told you what they wanted, but someone forgot to write it down, or write the code, somewhere along the line.
documentation and training requirements. In this case, your project team did not have the right customers at the beginning of the project.
after the functionality – it has to be designed in. Losing sight of that at the beginning of the project leads to situations like this.
Refining Requirements with Test Cases
these at the beginning of the project and plan for it. Usability testing could be done earlier, with the prototype, to allow suggested changes to be included in the final product.
either it needs to be created and tested for/monitored against, or no testing is
because there is no criterion to judge it against.
the application should be consulted at the beginning of the project to ensure these don’t get missed. In addition to preventing missed requirements, this improves rapport with the people who have to support your application. Bad rapport with this group could lead to poor support for the application, or even bad-mouthing your application to the customers when they have to make changes. There are many reasons a requirement could be missed:
requirements.
methodology correctly.
Some specific actions that cause requirement failure include:
Refining Requirements with Test Cases
training/documentation/usability/performance/security/supportability requirements
The only thing that can prevent missed requirements is a very strong project manager who anticipates problems and avoids them, but those are very rare, indeed. The next best thing is if everyone on the project team, including the QA lead, takes it upon himself to assist the project manager. How you can best do so depends on your project manager’s preferences and your own, but here are some suggestions that have worked for me:
find out whether there are things that aren’t being addressed early enough in the project plan, and talk to your project manager about it. Maybe they had to put this together themselves, and forgot about the need for security, or usability tests. Maybe they brought the methodology with them from another job where some of the test factors were significantly different. Maybe they inherited the methodology and want to replace it. You won’t know unless you ask.
attempting to get them resolved. No one likes to be ambushed by issues.
http://www.gantthead.com/ and use it to evaluate the requirements you get and the project milestones. Some of the lists are already phrased as questions to ask your
you and for your project. (Checklists for a project to build a hardware device, a client application, and an e-commerce site, for example, may differ greatly.)
requirements – Specific, Measurable, Achievable, Realistic, and Timely. You’re going to care about the “specific and measurable” part more than anyone else on the team, so use your insight to help your project leader.
Refining Requirements with Test Cases
Communicating requirement issues clearly with test cases
There are two ways I have been able to communicate ambiguous or missing requirements through test cases. However, neither of them would work if I did not sit down to review my test cases with the customers and project manager. I consider the test cases to be the last step in design in which these requirement issues can be effectively resolved, so these methods are designed to encourage the rest of the project team to take the issues as seriously as I do. Method One: highlight in test cases. If your test case or test plan document has a place to indicate issues, assumptions, or risks, use this to raise the issues you have spotted with the requirements and discuss briefly what the potential impact would be of failing to specify the requirements. An example: Notes/Assumptions/Limitations common to this set:
certain records absent when delivered for testing. If these records are not as expected, the test data used can be modified.
transactions.
cases will have to be modified for later regression testing to include the necessary screen shots and field labels.
standards are in place. Therefore, test cases A.A.2af and A.A.2ag will not be tested for this project.
be tested.
Refining Requirements with Test Cases
Method Two: force a decision. Test Case Identifiers: A.A.1.1f User in multiple sessions is ___________ (denied access? Notified? Ignored? Shot?) Risk Factor: C (Discretionary) Associated Use Case: A.A.1.1 Access Agency System Internally Associated Data: none Assumptions & Dependencies: Security System has been updated with user info Scenario: User logs in multiple times
Action Initial Screen Data Expected Results 1 Type user name into username field I-Login “goodguy” User name is displayed in username field 2 Type password into password field I-Login “teriyaki” Eight asterisks are displayed in the password field 3 Submit the user info I-Login {Enter} or Click “Submit” Intranet Applications Main Page is displayed. 4 Enter the Agency System Intranet Apps Main Page Select “Agency” Agency Search page is displayed 5 Repeat the four steps above this one three times in separate browser sessions 6 Type user name into username field I-Login “goodguy” User name is displayed in username field 7 Type password into password field I-Login “teriyaki” Eight asterisks are displayed in the password field 8 Submit the user info I-Login {Enter} or Click “Submit” User is notified /permitted to continue/ denied access/ shot/ electrocuted/ insulted/ given $1 million?
Why does this work?
performs a task. Thank you all for your time. Please feel free to send me any requirements stories, questions, or rants at tmartinm@texasmutual.com or stop by and visit me at Texas Mutual Insurance Company when you’re in Austin, Texas.