Black Box Software Testing Copyright 2003 Cem Kaner James Bach 499 Black Box Software Testing Part 12. Introduction to Test Documentation Co-authors:
Post on 18-Jan-2018
221 Views
Preview:
DESCRIPTION
Transcript
1Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Black Box Software Testing
Part 12.
Introduction toTest Documentation
Co-authors: Cem Kaner & James Bach
AcknowledgementSome of this material is from the Third Los Altos Workshop on Software Testing (LAWST), February 7 and 8, 1998. I founded the LAWST and was co-organizer of LAWST 3. At LAWST, we discussed test documentation (test planning strategies and materials). The agenda item was:
• How do we know what test cases we have? How do we know which areas of the program are well covered and which are not? • How do we develop this documentation EFFICIENTLY? As many of you know, I despise thick test plans and I begrudge every
millisecond that I spend on test case documentation. Unfortunately, some work is necessary. My question is, how little can we get away with, while still preserving the value of our asset?
The following people attended LAWST 3: Chris Agruss, James Bach, Karla Fisher, David Gelperin, Kenneth Groder, Elisabeth Hendrickson, Doug Hoffman, III, Bob Johnson, Cem Kaner, Brian Lawrence, Brian Marick, Thanga Meenakshi, Noel Nyman, Jeffery E. Payne, Bret Pettichord, Johanna Rothman, Jane Stepak, Melora Svoboda, Jeremy White, and Rodney Wilson.
2Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Copyright Notice
These slides are distributed under the Creative Commons License.
In brief summary, you may make and distribute copies of these slides so long as you give the original author credit and, if you alter, transform or build upon this work, you distribute the resulting work only under a license identical to this one.
For the rest of the details of the license, see http://creativecommons.org/licenses/by-sa/2.0/legalcode.
3Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Definitions• The test planning documents include:
– The Testing Project Plan, which identifies classes of tasks and broadly allocates people and resources to them;
– High-level designs for test cases (individual tests) and test suites (collections of related tests);
– Detailed lists or descriptions of test cases;– Anything else that you would put in a hard copy or virtual
binder that documents the collection of test cases that you will develop and run.
• This collection of materials is sometimes called the test plan and sometimes called the test documentation.
4Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Levels of Analysis• 1-Variable
– Basic user interface verification– Filters– Many testers stop here, at the most superficial level of testing
• 2-Variable– Shared or related filters– Logical relationships among variables
• Multi-Variable– The core problem is the vastness of the space of test cases. We
need a sampling strategy.
5Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Basic Test Documentation Components• Lists:
– Such as lists of fields, error messages, DLLs• Outlines: An outline organizes information into a hierarchy of
lists and sublists– Such as the testing objectives list later in the course notes
• Tables: A table organizes information in two dimensions showing relationships between variables.– Such as boundary tables, decision tables, combination test tables
• Matrices: A matrix is a special type of table used for data collection.– Such as the numeric input field matrix, configuration matrices
» Refer to Testing Computer Software, pages 217-241. For more examples, see page Testing Computer Software, page 218.
6Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Configuration Planning Table
Var 1 Var 2 Var 3 Var 4 Var 5
Config 1 V1-1 V2-1 V3-1 V4-1 V5-1
Config 2 V1-2 V2-2 V3-2 V4-2 V5-2
Config 3 V1-3 V2-3 V3-3 V4-3 V5-3
Config 4 V1-4 V2-4 V3-4 V4-4 V5-4
Config 5 V1-5 V2-5 V3-5 V4-5 V5-5
Config 6 V1-6 V2-6 V3-6 V4-6 V5-6
This table defines 6 standard configurations for testing. In later tests, the lab will set up a Config-1 system, a Config-2 system, etc., and will do its compatibility testing on these systems. The variables might be software or hardware choices. For example, Var 1 could be the operating system (V1-1 is Win 2000, V1-2 is Win ME, etc.) Var 2 could be how much RAM on the computer under test (V2-1 is 128 meg, V2-2 is 32 meg., etc.). Var 3 could be the type of printer, Var 4 the machine’s language setting (French, German, etc.). Config planning tables are often filled in using the All Pairs algorithm.
7Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Configuration Test Matrix
Config 1 Config 2 Config 3 Config 4 Config 5 Config 6
Test 1 Pass Pass Pass Pass Pass
Test 2 Fail Pass Pass Pass
Test 3 Pass Pass Pass Pass Pass
Test 4 Pass Fail Fail Pass
Test 5 Fail Pass Fail Pass Pass
This matrix records the results of a series of tests against the 6 standard configurations that we defined in the Configuration Planning Table.
In this table, Config 1 has passed 3 tests, failed 1, and hasn’t yet been tested with Test 2. Config 6 is still untested.
8Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Black Box Software Testing
Part 13.
Scripting:
An Industry Worst Practice
9Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Scripting
• COMPLETE SCRIPTING is favored by people who believe that repeatability is everything and who believe that with repeatable scripts, we can delegate to cheap labor.
1 ____ Pull down the Task menu 2 ____ Select First Number3 ____ Enter 34 ____ Enter 25 ____ Press return6 ____ The program displays 5
10Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Scripting: Another script format
Step #
Check?
What to do
What to see
Design notes
Observation notes
1. ____ Pull down task menu
Task menu down
This starts the blah blah test, with the blah blah goal
11Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Scripting: The Bus of Testing
– Scripting is the Greyhound Bus of software testing:
“Just relax and leave the thinking to us.”
– To the novice, the test script is the whole tour. The tester goes through the script, start to finish, and thinks he’s seen what there is to see.
– To the experienced tester, the test script is a tour bus. When she sees something interesting, she stops the bus and takes a closer look.
– One problem with a bus trip. It’s often pretty boring, and you might spend a lot of time sleeping.
12Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Scripting (Manual Test Cases)
Worst of all worlds:
• Not automated
• Not maintainable
• No communication of analysis
• NOT REPEATABLE!
13Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Scripting
Should we create scripts as pseudocode, in preparation for test automation?
• Suggestion made at STAR 97• But most (88%) of bugs were found during
creation of the scripts (my experience too).
Maybe the benefit lies in structured exploration, rather than regression.
14Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Never Do ANY kind of Scripting?• Checklists (as distinct from scripts) have their place. For
example, think of releasing a product:– Many very different tasks– All of them must be done– The task is rarely done, so many steps may be forgotten.
• I prefer to tell testers what to test (what issues to cover), not how to do the tests. Teaching people “how” is a matter of training, not something that I record time and time again in the test plan. A checklist will sometimes be the right way to present the list of issues.
• I think the level of detail is sufficient if I can successfully pass the section to a reasonably experienced tester who is a little familiar with the program and be confident that she can figure out what the test cases are and how to run them.
15Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Black Box Software Testing
Part 14.
Requirements Analysis for Test Documentation
16Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Problems with the (allegedly) standard approach
• It is essential to understand your requirements for test documentation.
• Unless following a “standard” helps you meet your requirements, it is empty at best, anti-productive at worst.
17Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Problems with the (allegedly) standard approach
• IEEE Standard 829 for Software Test Documentation– Test plan– Test-design specification– Test-case specification
• Test-case specification identifier• Test items• Input specifications• Output specifications• Environmental needs• Special procedural requirements• Intercase dependencies
– Test-procedure specification– Test-item transmittal report– Test-log
We often see one or more pages per test case.
18Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Problems with the (allegedly) standard approach
– What is the documentation cost per test case?– What is the maintenance cost of the documentation, per test case?– If software design changes create documentation maintenance
costs, how much inertia do we build into our system? How much does extensive test documentation add to the cost of late improvement of the software? How much should we add?
– What inertia is created in favor of invariant regression testing?– Is this incompatible with exploratory testing? Do we always want
to discourage exploration?
19Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Problems with the (allegedly) standard approach
– What is the impact on high-volume test automation?– How often do project teams start to follow 829 but then give it up
mid-project? What does this do to the net quality of the test documentation and test planning effort?
– WHAT REQUIREMENTS DOES A STANDARD LIKE THIS FULFILL?
– WHICH STAKEHOLDERS GAIN A NET BENEFIT FROM IEEE STANDARD DOCUMENTATION?
– WHAT BENEFITS DO THEY GAIN, AND WHY ARE THOSE BENEFITS IMPORTANT TO THEM?
20Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Standards:ISO 9000-3
• The basic thinking underlying ISO 9000 goes like this:– Decide what you’re going to do (create and document a process).– Do what you said you’d do.– Document what you’ve done in a way that lets an auditor check
what you’ve done against your process.• Risks
– It can be difficult to build in room for exploratory testing. To some degree (perhaps a large degree), this depends on the auditor.
– The style and extent of documentation needed to clue in a third party (auditor) might go beyond your internal needs. On finite budgets, where do we draw the line?
– What is the best tradeoff between process development and test execution? This must be a practical question, not a religious question.
21Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Requirements
– There are many different notions of what a good set of test documentation would include. Before spending a substantial amount of time and resources, it’s worth asking what documentation should be developed (and why?)
– Test documentation is expensive and it takes a long time to produce. If you figure out some of your main requirements first, you might be able to do your work in a way that achieves them.
22Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Defining documentation requirements
– Stakeholders, interests, actions, objects• Who would use or be affected by test documentation?• What interests of theirs does documentation serve or disserve?• What will they do with the documentation?• What types of documents are of high or low value?
– Asking questions– Context-free questions– Context-free questions specific to test planning– Evaluating a plan
23Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Discovering Requirements
• Requirements– Anything that drives or constrains design
• Stakeholders– Favored, disfavored, and neutral stakeholders
• Stakeholders’ interests– Favored, disfavored, and neutral interests
• Actions– Actions support or interfere with interests
• Objects
24Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
What is your group’s mission?• Find important problems• Assess quality• Certify to standard• Fulfill process mandates• Satisfy stakeholders• Assure accountability
• Advise about QA• Advise about testing• Advise about quality• Maximize efficiency• Minimize time• Minimize cost
The quality of testing depends on which of thesepossible missions matter and how they relate.
Many debates about the goodness of testingare really debates over missions and givens.
25Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Test Docs Requirements Questions• Is test documentation a product or tool?• Is software quality driven by legal issues or by market
forces?
• How quickly is the design changing?
• How quickly does the specification change to reflect design change?
• Is testing approach oriented toward proving conformance to specs or nonconformance with customer expectations?
• Does your testing style rely more on already-defined tests or on exploration?
• Should test docs focus on what to test (objectives) or on how to test for it (procedures)?
• Should the docs ever control the testing project?
26Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Test Docs Requirements Questions
• If the docs control parts of the testing project, should that control come early or late in the project?
• Who are the primary readers of these test documents and how important are they?
• How much traceability do you need? What docs are you tracing back to and who controls them?
• To what extent should test docs support tracking and reporting of project status and testing progress?
• How well should docs support delegation of work to new testers?
• What are your assumptions about the skills and knowledge of new testers?
• Is test doc set a process model, a product model, or a defect finder?
27Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Test Docs Requirements Questions
• A test suite should provide prevention, detection, and prediction. Which is the most important for this project?
• How maintainable are the test docs (and their test cases)? And, how well do they ensure that test changes will follow code changes?
• Will the test docs help us identify (and revise/restructure in face of) a permanent shift in the risk profile of the program?
• Are (should) docs (be) automatically created as a byproduct of the test automation code?
28Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Example: Early vs. Late Planning• Benefits of early planning
– Scheduling and staffing (unless things change)– Early opportunity to review (if people can understand your work)
• Costs of early planning– Any delays in finding bugs are expensive. You should start finding
bugs ASAP.– Early investment in test case design is risky if the product design is
subject to change.– You will keep learning over time. Planning early sometimes
precludes groups from inventing new tests later.– Depth of testing should reflect risks, many of which are unclear until
mid-project.• MY USUAL GOAL: Do just-in-time test planning without losing key
benefits of early work.
29Black Box Software Testing Copyright © 2003 Cem Kaner & James Bach
Ultimately, write a mission statement
• Try to describe your core documentation requirements in one sentence that doesn’t have more than three components.
• Examples:– The test documentation set will primarily support our efforts to
find bugs in this version, to delegate work, and to track status.– The test documentation set will support ongoing product and test
maintenance over at least 10 years, will provide training material for new group members, and will create archives suitable for regulatory or litigation use.
top related