use cases to test cases traceability neorug – may 14 th, 2008

Post on 01-Apr-2015

214 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Use Cases to Test Cases Traceability

NEORUG – May 14th, 2008

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

2

AgendaIntroductionOverview of TraceabilityHow to create Test Cases from Use CasesSummaryReferencesQuestions

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

3

AgendaIntroduction

Cardinal Solutions Fast FactsSpeaker Bio

Overview of TraceabilityHow to create Test Cases from Use CasesSummaryReferencesQuestions

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

4

Cardinal Solutions Fast Facts• Founded in 1996 (11 years) • Over 200 professionals• Offices in 3 cities

– Cincinnati– Columbus– Charlotte

• Client projects > 15 cities

• $30M Revenue

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

5

Speaker Nilesh Prabhu, IBM Certified for Rational

Requirements Management with Use CasesPrincipal Consultant at Cardinal Solutions GroupProcess Engineer, Business Analyst : InsuranceTest Lead, Business Analyst : Pension Functional Lead, Test Designer : ManufacturingProgrammer, Tester : Financials

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

6

Agenda Introduction Overview of Traceability

Definition Item Types Role The V Model Where RUP Fits

How to create Test Cases from Use Cases Summary References Questions

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

7

What is Traceability? • "The degree to which a relationship can be established

between two or more products of the development process, especially products having a predecessor-successor or master-subordinate relationship to one another; for example, the degree to which the requirements and design of a given software component match.” (IEEE 610.12-1990 ý3)

• A Technique used to provide relationship between Requirements, Design and Implementation of System in order to manage the effect of change and ensure the success of delivered system.

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

8

Traceability Item• Any project element that needs to be explicitly traced from another textual or model item in order

to keep track of the dependencies between them.

• Example: – Business Rationale– Stakeholder Need– Feature– Use Case– Actor– Wireframes– Business Rules– Design, Development Component– Test Cases– Defects– User Training Guides– Glossary Term– Etc.

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

9

Traceability Types• Vertical Traceability

– Defines relationship between different Project Items

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

10

Traceability Types• Horizontal Traceability

– Defines relationship among similar Project Items

Use Cases

Information Requirements

Non Functional Requirements

Wire-frames

Info Reporting Requirements

Business Rules

Audit ControlRequirements

SecurityRequirements

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

11

Role of Traceability• Coverage Analysis

– Verify that an implementation fulfills all requirements

• Everything that the customer requested was implemented

– Verify that the application does only what was requested

• Don't implement something that the customer never asked for

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

12

Coverage Traceability View

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

13

Role of Traceability• Change Impact Analysis

– Determine the impact of a proposed change:• For example, when some requirements change,

we want to know which test cases should be redone to test this change

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

14

Change Impact Traceability View

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

15

The V Model

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

16

Where does the RUP fit in?

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

17

Iterative Development Process

Business Modeling

RequirementsAnalysis &

DesignImplementation Test Deployment

Business Modeling

RequirementsAnalysis &

DesignImplementation Test Deployment

Business Modeling

RequirementsAnalysis &

DesignImplementation Test Deployment

Iteration 1

Iteration 2

Iteration 3

• Testing starts as early as Iteration 1 and continues thru the

remaining iterations.

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

18

Agenda Introduction Overview of Traceability How to create Test Cases from Use Cases

Proposed Format of a Test CaseCore ProcessBenefits

Summary References Questions

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

19

Proposed format of a Test CaseStep # Action/Execution Step Test Data Expected Result

1 Enter Date of Birth and Select Marital Status

Date of Birth: 05/12/1978Marital Status: Single

Calculate Age.

2 Select Gender Male

3 Enter Phone Number 614 999 1234Prompt Primary or secondary

4 Click Submit N/ADisplay confirmation number.

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

20

Test Case Creation Process• Identify all Scenarios from Use Cases

– Activity Diagrams are basis for Scenario generation

– Review alternate flows of a Use Case

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

21

Test Case Creation Process

Scenario 1 Basic Flow      

Scenario 2 Basic Flow Alternate Flow 1    

Scenario 3 Basic Flow Alternate Flow 1 Alternate Flow 2  

Scenario 4 Basic Flow Alternate Flow 3    

Scenario 5 Basic Flow Alternate Flow 3 Alternate Flow 1  

Scenario 6 Basic Flow Alternate Flow 3 Alternate Flow 1 Alternate Flow 2

Scenario 7 Basic Flow Alternate Flow 4    

Scenario 8 Basic Flow Alternate Flow 3 Alternate Flow 4  

• Document All Scenarios

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

22

Test Case Creation Process• Create a new requirement type as

“Scenarios”

• Trace Identified Scenarios to Use Case

Business Need

Feature 1

Feature 2

Use Case 1

Use Case 2

Use Case 3

Scenario 1

Scenario 2

Scenario 8

.

.

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

23

Test Case Creation Process• Review individual Use Case / Scenario

step to identify variables

• Ex. Steps from Manage Personal Information Use Case is:

• Customer enters Date of Birth, • Customer selects Marital Status

• Variables are: Date of Birth and Marital Status

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

24

Test Case Creation Process• Identify and document significantly different

options for each Use Case step• Date of Birth

1. Regular: MM/DD/YYYY2. Empty: 3. Min Allowed: 01/01/19014. Min Allowed – 1 Day5. Max Allowed:12/31/99996. Max Allowed + 1 Day7. Logically invalid: MM > 12, DD > 31 & YYYY > 9999

• Marital Status1. Single 2. Married3. Separated 4. Divorced

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

25

Test Case Creation Process• Select options that should be tested

• Date of Birth: Regular, empty, 12/31/1900, 12/31/9999, Logically invalid (13/32/2008)

• Marital Status: Each status once

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

26

Test Case Creation Process• Combine options to be tested into Test Cases

Date of Birth Marital Status Gender Phone No Submit

R

E

Min-1

Max+1

I

S

M

SP

D

M

F

R

E

I

TC1

TC2

TC 3

TC4

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

28

Test Case MatrixStep Variable or

SelectionTC1 TC 2 TC 3 TC 4

1 Date of Birth Regular Regular Regular Regular

2 Marital Status Single Married Separated Divorced

3 Gender Male Male Female Female

4 Phone No Regular Regular Regular Invalid

5 Submit Same Same Same Same

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

29

Test Case Creation Process• Assign values to variables Per Test Case Step Variable or

SelectionValue Expected

Results

Actual

Results

1 Date of Birth 03/29/1976 Calculate Age

2 Marital Status Married Prompt for spouse details

3 Gender Male -

4 Phone No 614 555 3289 Prompt for

primary or secondary

5 Submit Same Display Confirmation Number

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

30

Traceability Matrix View from Requisite Pro

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

31

Traceability Tree View from Requisite Pro

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

32

Benefits of Tracing to Test Cases• Test Cases are derived in more automatic way

• Better test coverage

• Easier to monitor testing progress

• Work load balance between testers

• Easier regression testing

• Contribution to early discovery of missing requirements

• Understand the impact of change

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

33

Summary• Traceability establishes relationships between

various project items• Use cases drive scenarios which drive test

cases• “Step” in a Use Case corresponds to “Step” in a

test case • Right project items are addressed in right phase• Reduce effort required for impact analysis due to

a change request

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

34

References• Dean Leffingwell and Don Widrig : Managing Software

Requirements: A Unified Approach. Addison-Wesley 1999

• Peter Zielczynski : Requirements Management using IBM Rational Requisite Pro

• Jim Heumann : “Using Use Cases to create Test Cases.” The Rational Edge, June 2001

• Rational Unified Process. IBM Rational Software Corporation, 2001.

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

35

Questions

Q&A

Use Cases to Test Cases Traceability

© 2008 Cardinal Solutions Group

36

© 2008 Cardinal Solutions Group

Contact Information

Consulting: Training:npeterson@cardinalsolutions.com training@cardinalsolutions.com

Cincinnati Office8044 Montgomery RdSuite 420 Cincinnati, OH 45236

Toll Free: 888-503-2218Phone: 513-984-6700 Fax: 513-792-2835

Charlotte Office525 N. Tyron. St.Suite 1700 Charlotte, NC 28202

Phone: 704-331-6567Fax: 704-331-3950

 

www.cardinalsolutions.com

Columbus Office401 N. Front. St.Suite 210 Columbus, OH 43215

Toll Free: 866-806-3486Phone: 614-545-3860Fax: 614-545-3872

 

top related