Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Agenda
Defining Test Requirements (TR)
What, Why, Where
Organizing & Decomposing TRs Test Requirements Hierarchy Samples Setting the stage for measuring test coverage
2
Background
Test Requirements Hierarchy is a term coined from Rationals SQA Team Test software. The principle of identifying, organizing, and measuring test requirements is universal to many test processes and methodologies Much of this in-service is distilled from:
Rational methodologies (we are an SQA Team Test house after all) QAI Workbench model Seminar topics from
19th annual International Software Testing Conference Star 98 West Conference
3
Test Requirements
What exactly is a Test Requirement? Why identify Test Requirements? Where does a Test Requirement come from?
Includes both normal and error conditions Covers business rules, functionality, nonfunctional standards Do NOT have case specific data values assigned to them yet (data appears in test cases, the How of testing) examples
5 Defining TRs: What, Why, Where
These are test requirements NOT tests because they do not describe the data element being inserted The data is irrelevant at this level, it will appear in the test cases used to cover these test requirements Validate you can insert John Doe is a test case not a test requirement
Reality:
Interview Analysis, Non-Functional Checklists (standards & compliance), Use Cases (from business scenarios and users), Discovery during testing, any other deliverables from previous workbenches (diagrams, modeling, flowcharts, etc.)
8 Defining TRs: What, Why, Where
Agenda
Defining TRs: What, Why, Where Fitting TRs into the testing picture
Whats within our testing process Generating TRs
Organizing & Decomposing TRs Test Requirements Hierarchy Samples Setting the stage for measuring test coverage
10
Generates
Test Requirement
1
Generates
Executes/Runs
1
Drilling Down
Business Requirement
Test Requirement Test Scenarios/ Cases Test Procedure/ Script
Fitting TRs into the testing picture
First, Lets look at this relationship: Whats within our testing process
Then well look at this relationship: Gernerating TRs from what feeds into our testing process
12
Group Exercise! 1. Limit the scope to these 3 requirements. 2. What will you validate (test for)? 3. Are there any implied requirements that may not be written out?
Whats within our testing process
13
14
These are test requirements NOT tests because they do not describe the data element being used (like $20, $40, $60, $1) The data is irrelevant at this level, it will appear in the test cases used to cover these test requirements
Whats within our testing process
Test Scenarios/Cases for Validate that a withdrawal of a multiple of $20, between $20-$300 can be done
Actual Results
$20 withdrawn $40 withdrawn $60 withdrawn $80 withdrawn $100 withdrawn : $260 withdrawn $280 withdrawn $300 withdrawn
Whats within our testing process
Script: (in
pseudo-code )
Do until EOF until end of data file Input data record Senddata CARDINFO to Cardfield Senddata Enter Senddata PIN to PINFfield Senddata Enter Senddata W to SelectionField Senddata AMOUNT to DollarField Senddata Enter If ErrorMsg > 0 then print ErrorMsg Print DollarAMTgiven Loop
Whats within our testing process
16
Agenda
Defining TRs: What, Why, Where Fitting TRs into the testing picture
Whats within our testing process Generating TRs
Organizing & Decomposing TRs Test Requirements Hierarchy Samples Setting the stage for measuring test coverage
17
Product Input
DO
Check
Product Output
Entrance Criteria
Standards Tools
Exit Criteria
Generating TRs
Generating TRs
Do the test requirements cover the complete scope of the project? Are all the test requirements verified and signed off by the Development Team?
20
Generating TRs
Trace them back to the source Remember that different applications arrange in different ways
- Think of MF, batch, C/S, web, e-commerce, GUI, etc. - Use testing considerations checklists that generally cover what kinds of things should be considered when testing your specific situation
Also...
Maintain a level of balance between too much & too little
- Too High level: wont be useful, vague, cant generate test cases from it. - Too low level: Over-process, over documentation, no productivity - General rule: 5-7 levels deep in an outline format
Organize them!
22
Outline/Hierarchy format recommended Look at how the BA breaks down the project into areas Look at how the PA breaks down the project into areas Organize by functional areas Organize by types of testing (Function vs. System vs. NonFunctional)
Generating TRs
Agenda
Defining TRs: What, Why, Where Fitting TRs into the testing picture
Whats within our testing process Generating TRs
X. Resource Usage Tests XI. Documentation Tests XII. Compatibility Tests XIII. Recovery Tests XIV. Serviceability Tests and others *III - XIV are all Systemsbased tests
Organizing TRs
25
Organizing TRs
Organizing TRs
Agenda
Defining TRs: What, Why, Where Fitting TRs into the testing picture
Whats within our testing process Generating TRs
Organizing & Decomposing TRs Test Requirements Hierarchy Samples Setting the stage for measuring test coverage
27
Business Requirement
Test Requirement
Keep the function-based perspective in mind!
Tasks within the Function Transactions to perform a task Data Entry Types for transactions Field Validation
29
30
Decomposing TRs
Decomposing TRs
32
Decomposing TRs
Be sure all areas of the system are covered. If something is left out or doesnt fit into a group, it becomes its own group. It may be easier to identify functional areas by window instead of by function.
33
Function
Task
Transaction
Field Validation
Decomposing TRs
34
Function
Task
Transaction
Field Validation
Decomposing TRs
Task Level
Break down each Function area into the tasks within the function For complex tasks, it is possible to break them down further into sub-tasks Some Business Functions can not decompose into further tasks (example: Check Writing function)
35 Function
Task
Transaction
Field Validation
Decomposing TRs
Transaction Level
From this level down, we start to address the internal things that occur to make the functions and tasks happen Identify any logical transactions that ties the task to the database or any other transactions necessary to perform the task. Identify any data processing, calculation, data formatting type transactions
Note: A screen or window may cause the execution of several different logical transactions
36 Function Task
Transaction
Field Validation
Decomposing TRs
Field Validation
Decomposing TRs
38
Function
Task
Transaction
Decomposing TRs
Decomposing TRs
Decomposing TRs
Decomposing TRs
1.4.2.1 Validate the expiration date is a valid future date 1.4.2.2 Validate the expiration date is not within 1 month of expiring. 1.4.2.3 Validate that the CC# is 12 digits 1.4.2.4 Validate that the $ amount is <= credit balance available 1.4.2.5 Validate that an authorization # is received.
44
Decomposing TRs
Agenda
Defining TRs: What, Why, Where Fitting TRs into the testing picture
Whats within our testing process Generating TRs
Organizing & Decomposing TRs Test Requirements Hierarchy Samples Setting the stage for measuring test coverage
45
TRH Samples
Lets look at a few examples of how test requirements can be organized:
- Sample 1: Excerpt from a Personal Finance app - Sample 2: actually organizing Function requirements, but good representative of the concept - Sample 3: QBS, from Rationals sample project (adds types of testing into the hierarchy) - Sample 4: another view of the Personal Finance app - Sample 5: A mainframe batch system
46
Test Coverage Measures Test Requirements are the what of testing & are the basis for establishing the completion of testing TRs give us the point of measurement for test coverage Each TR should receive a Priority, Risk, and Weight Each TR should be tracked for Verification (3) and Validation (%)
47