Traceability From Use Cases To Test Cases

Similar documents
The role of integrated requirements management in software delivery.

Advanced Software Test Design Techniques Use Cases

How to Use e-commerce on

UML TUTORIALS THE USE CASE MODEL

Course Registration Case Study

User experience storyboards: Building better UIs with RUP, UML, and use cases

Keywords Online food system, Short Massage Service, E-business, notification

UML Activity Diagrams: Versatile Roadmaps for Understanding System Behavior

The Role of Requirements Traceability in System Development

Click DVDs. Just click to pick. CS4125 Systems Analysis and Design Chantelle Geoghegan Danielle Frawley

Non-Functional Requirements

Tips for writing good use cases.

OO Analysis and Design with UML and USDP. Solutions. Created by Dr. Jim Arlow. Version 2.0

The Rap on RUP : An Introduction to the Rational Unified Process

PaymentNet Federal Card Solutions Cardholder FAQs

Solutions e Selection wledg Kno.com ficedepot bsd.of

Software Engineering. Session 3 Main Theme Requirements Definition & Management Processes and Tools Dr. Jean-Claude Franchitti

System testing from UML diagrams

Using Use Cases on Agile Projects

Functional Test Plan Template

Test Design Strategies

Merchant Interface Online Help Files

Appendix 2-A. Application and System Development Requirements

Online Shop System Use Case Diagram Report (Demo)

Electronic Data Solutions. E-Prescription System Software Requirement Specifications. Version 1.0

Developing Complex Systems using DOORS and UML

CSSE 374 Software Architecture and Design I

Document Services Online Customer Guide

How To Create A Diagram On Rational Software Development Platform

Rational Software. Course Registration System Use-Case Model

Codeless Test Automation for Web Apps

About Online Secure Shopping

Chap 1. Introduction to Software Architecture

SYSTEM DEVELOPMENT AND IMPLEMENTATION

The Five Levels of Requirements Management Maturity

Affirmation of Accurate Information On the next you must affirm that that you are providing complete and accurate information. If you affirm, click

Traceability Strategies for Managing Requirements with Use Cases. By: Ian Spence, Rational U.K. Leslee Probasco, Rational Canada,

Software Design Document for Online Shopping Mall TEXAS A&M UNIVERSITY 11/15/2010

MASTERPASS MERCHANT ONBOARDING & INTEGRATION GUIDE

To create User who have already been registered with OCR and have received Registration Number can follow the following steps.

IBM i Version 7.2. Security Service Tools

Manual. Version: 1.0.0

EMMA Application v. 4.9 User Manual

Basics of Dimensional Modeling

Announcements. SE 1: Software Requirements Specification and Analysis. Review: Use Case Descriptions

Supply Chain Management Use Case Model

Sitecore E-Commerce Cookbook

Logistics. Software Testing. Logistics. Logistics. Plan for this week. Before we begin. Project. Final exam. Questions?

Communication Diagrams

Use Case Modeling. Software Development Life Cycle Training. Use Case Modeling. Set A: Requirements Analysis Part 3: Use Case Modeling

Electronic Funds Transfer (EFT) Guide

Requirements Definition and Management Processes

BMO NESBITT BURNS. Gateway User Guide. An Online Standard in Connectivity

Use-Case Analysis. ! What is it? ! From where did it come? ! Now part of UML

IFML by Example: Modeling an Online Bookstore

New York University Computer Science Department Courant Institute of Mathematical Sciences

Solutions for Quality Management in a Agile and Mobile World

State of Michigan Data Exchange Gateway. Web-Interface Users Guide

Verified Volunteers. System User Guide 10/2014. For assistance while navigating through the system, please contact Client Services at:

Model-based Testing: Next Generation Functional Software Testing

Agency Training Manual: Letter of Intent

STOCK MARKET INVESTMENT FANTASY LEAGUE

Modeling a Problem Scenario with UML

Electronic Bill of Lading for Carriers

USING UML FOR OBJECT-RELATIONAL DATABASE SYSTEMS DEVELOPMENT: A FRAMEWORK

User Guide and Tutorial Central Stores Online Ordering System. Central Stores Financial Services Western Washington University

CIS 544 Advanced Software Design and Development. Project Management System. Oreoluwa Alebiosu

Analysis and Design with UML

How To Access A Secure From The State Of Iceland

Use Cases. Reference: Craig Larman, Applying UML and Patterns, Ch. 6

Insurance Brokers - from initial registration to ongoing submittal, retrieval, and editing of new or existing certificates of insurance.

eva Purchasing & Banner Receiving Manual

Getting Started Guide

USING THE ADMIN MENU SELECTION IN THE MY MEMBERSHIP RECORD ONLINE

Order a Transcript/Enrollment Verification as a Former Student

Online Stationery Ordering Tutorial. Prepared by Collegiate Press

Fiat Group Purchasing Supplier Quality SQP User Manual Version 4 September 2008

Security Service tools user IDs and passwords

Agile QA Process. Anand Bagmar Version 1.

AGILE CLOUD PBX OPERATION MANUAL

Shopping Application Overview

Plan-Driven Methodologies

ISO 9001:2000 Its Impact on Software

Optum ID Migration for Provider Express Users

IBM Information Server

Ordering Textbooks Online through the LCCC Bookstore

INTERNET PAYMENTS GUIDE FOR PARENTS

WebEx Meeting Center User Guide

Mobile Money Manager

EXPLORING YOUR YMCA ONLINE ACCOUNT

CPS122 - OBJECT-ORIENTED SOFTWARE DEVELOPMENT. Team Project

Transitioning from Requirements to Design

Government of Saskatchewan Executive Council. Oracle Sourcing isupplier User Guide

The Dangers of Use Cases Employed as Test Cases

Settlement Agent Self Registration User Guide. Settlement Agents step by step action guide for Agency Registration

Managing Users and Identity Stores

API Integration Payment21 Button

PHI Audit Us er Guide

Travel & Expense Reimbursement System Information IBM GERS SYSTEM

Transcription:

1 IBM Software Group IBM Software Group Traceability From Use Cases To Test Cases Peter Zielczynski, Ph.D. The A Consulting Team PZielczynski@tact.com RM14 Agenda Overview of the requirements types Traceability between requirements Actors and Use Cases How to create Test Cases from Use Cases Mapping to RUP Conclusions

2 What is a requirement? A requirement is defined as "a condition or capability to which a system must conform" A capability needed by a customer or user to solve a problem or achieve an objective A capability that must be met or possessed by a system to satisfy a contract, standard, specification, regulation or other formally imposed document A restriction imposed by a stakeholder Requirements pyramid Needs Features Use Cases Supp Scenarios Test Cases

3 Agenda Overview of the requirements types Traceability between requirements Actors and Use Cases How to create Test Cases from Use Cases Mapping to RUP Conclusions What is traceability? A technique used to provide relationships between requirements, design and implementation of a system in order to manage the effect of change and ensure the success of the delivered systems The ability to describe and follow the life of a requirement, in both a forward and backward direction A technique allowing to determine the origins of any requirement

4 Traceability of requirements Needs Features Use Cases / Supp Spec Scenarios Test Cases Role of traceability To verify that implementation fulfills requirements Lower-level requirements are consistent with stakeholder needs To verify that the application does only what was intended All functionality was requested Only required testing was performed To help change management Analyze impact of requirements change

5 What is a 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 With respect to RequisitePro: Any project element represented within RequisitePro by an instance of a RequisitePro requirement type Sample traceability items defined as requirement types in RequisitePro: Stakeholder Need Feature Use Case Actor Glossary Term Showing traceability in RequisitePro

6 Agenda Overview of the Requirements Types Traceability between requirements Actors and Use Cases How to create Test Cases from Use Cases Mapping to RUP Conclusions Use Cases and Actors Use Case: A description of system behavior, in terms of sequences of actions. A use case should yield an observable result of value to an actor. A use case contains basic flow and all related alternate flows of events. Use Case Actor: Someone or something external that interacts with the system. Actor

7 Characteristics of a Use Case Is initiated by an actor to invoke functionality Models an interaction between an actor and the system Describes sequence of actions or related steps Captures functional requirements Provides value to the actor Is a complete and meaningful flow of events from the perspective of a particular actor ABC of writing effective Use Cases Address functionality Briefness in narrative Communicate effectively (By Anand Maharana)

8 What is a purpose of Use Cases? To agree with the customers and users on what the system should do Basis for Use Case realizations that play major role in the design May be almost directly used for documentation Basis for planning the technical content of iterations Give system developers a better understanding of the purpose of the system Can be used as an input for Test Cases Use Case Diagrams Place an order Cancel an order Check order status Customer

9 Use Case format 1. Brief Description 2. Flow of Events 1. Basic Flow 2. Alternative Flow 1 3. Alternative Flow 2 3. Special Requirements 4. PreConditions 5. PostConditions 6. Extension Points 7. Context Diagram 8. Activity Diagram Use Case Place an order : Basic Flow B1 B2 B3 B4 B5 B6 User enters web site address in the browser. System displays login page. User enters an email address and a password. System confirms correct login, presents main page, and prompts for a search string. User enters search string partial name of a book. System returns all books matching search criteria. User selects a book. System presents detailed information about a book. User adds the book to a shopping cart. Shopping cart contents is presented to the user. User selects proceed to checkout option. System asks for confirmation of a shipping address.

10 Use Case Place an order : Basic Flow B7 B8 B9 B10 User confirms shipping address. System presents shipping options. User selects shipping option. Systems asks which credit card will be used. User confirms credit card that is stored in the system. System asks for final confirmation to place an order. User places the order. System returns confirmation number. Alternate Flow 1: Unregistered user A1.1 Alternate flow begins after step B1 when user selects Register now option. System prompts for required information: name, address, userid, password. A1.2 User provides required information. Systems confirms registration and presents login screen. A1.3 Flow continues from step B2 of the Basic Flow.

Alternate Flow 2: Invalid password A2.1 Alternate flow begins after step B1 when user enters userid and password. When either userid or password are invalid, system returns an error message and displays login page. A2.2 Flow continues from step B2 of the Basic Flow. Activity Diagram Is user registered? No User registers A1 unregistered user User enters email and password A2 invalid password Is password No correct? User enters search criteria Is there at least one selection? No System displays notification A3 no books found System presents list of selections No User selects a title System presents details about selected book Does user want to buy this book? A4 declining a book User adds the book to a shopping cart System displays Shopping cart Does user want to continue shopping? A5 continue shopping 11

12 Activity Diagram A6 new address User proceeds to checkout User confirms address No Is shipping address the same as in previous order? User enters new address User selects shipping options A7 new credit card Does user want to use same credit card? No User adds new credit card information User confirms the card A8 cancel order No Does user want to cancel the order? User cancels order User confirms order System returns confirmation number Agenda Overview of the requirements types Traceability between requirements Actors and Use Cases How to create Test Cases from Use Cases Mapping to RUP Conclusions

13 Proposed format prepares generation of Test Cases Steps in a Use Case correspond to steps in Test Case Unique numbering makes referring steps easy Combining user s input and system s response in one step Activity diagram is a basis for scenario generation What is a Scenario? Scenario describes one particular path through the flow of events described in a Use Case Scenario is an instance of an Use Case

14 How to find all Scenarios B A1 A3 A2 A4 Description of Scenario Scenario can be described by: A sequence of alternate flows Example: SC16: A2 A2 A6 A sequence of steps that form a scenario Example: SC16: B1, A2.1, A2.2, A2.1, A2.2, B2, B3, B4, B5, B6, A6.1, A6.2, B8, B9, B10

No Is user registered? User enters email and password Is password correct? User enters search criteria Is there at least one selection? System presents list of selections User selects a title Sy stem presents detai ls about selected book No User confirms order No Does user want to buy this book? User adds the book to a shopping cart System displays Shopping cart No User proceeds to checkout User confirms address User confirms the card System returns confirmation number Does user want to cancel the order? No User registers No System displays notification No No User enters new address User adds new credit card information User cancels order 15 Infinite loops B A1 Scenarios for book ordering use case SC1 B A1 unregistered user SC2 A1 A2 invalid password SC3 A2 SC4 A3 SC5 A4 SC6 A5 A3 no books found A4 declining a book SC7 A6 SC8 A7 SC9 A8 SC10 A1, A2 2 (8+4) = 4096 User selects shipping options Does user want to continue shopping? Is shipping address the same as in previous order? A5 continue shopping A6 new address SC11 A3, A4 Does user want to use same credit card? A7 new credit card SC12 A4, A5 SC13 A3, A5 A8 cancel order SC14 A6, A7 SC15 A7, A8

16 Create requirement type Scenario Traceability from Use Cases to Scenarios

17 From Scenarios to Test Cases Identify variables for each Use Case step Identify significantly different options for each step Select options that should be tested Combine options to be tested into Test Cases Assign values to variables Identify variables for each Use Case step B2 Enter e-mail address and password email (string) password (string) B3 Search a book search sentence (string) B4 Select a book books (list) B8 Select shipping option shipping method

18 Identify significantly different options for each step Strings regular empty min allowed max allowed max + 1 very big logically invalid Characters lowercase a uppercase A numeric 5 special # john_smith@aol.com a@b.com 12345678910@verylongdomainname.com 012345678910@verylongdomainname.com aaaaaaaaaaaaaaaaaaaaaaaaaaaa... john_smith@aol.xyz Identify significantly different options for each step Numbers regular min max min - 1 max + 1 0 Negative Search criteria 1 element returned many elements no elements

19 Identify significantly different options for each step Single selection sets of items each item selected once Multiple selection sets of items one selection no selection many selections all items selected Select options that should be tested B1 email: regular, empty, 1, 50, 51, 257 char, no @ B1 password: regular, empty, 5, 6, 10, 11, 257 char B2 search sentence: regular, empty, 1, 300, 301 char B3 books: first selection, last selection B6 shipping method: each method once

20 Combine options to be tested into Test Cases email pwd search book add checkout shipping order R R E 1 50 51 E 5 6 10 R E 1 300 F L 5 3 2 1 L 11 301 I L Combine options to be tested into Test Cases email pwd search book add checkout shipping order R R R 5 1 50 6 1 F L 3 2 10 300 Test Case 1 Test Case 2 Test Case 3 Test Case 4 1

21 Guidelines for combining options Rules to select an option is step n: Take any option that was not used yet Take an option that was not used after the option selected in step n-1 Take an option that was used the least Test Case matrix Step Variable or TC1 TC2 TC3 TC4 selection B1 Website Regular Regular Regular Regular B2 Email Regular Min Max Regular B2 Password Regular Min Max Min B3 Search string Regular Min Max Regular B4 Book selection First Last First Last B5 Shopping chart Add Add Add Add B6 Checkout Checkout Checkout Checkout Checkout B7 Address Same Same Same Same B8 Shipping option 1 st 2 nd 3 rd 4 th B9 Credit card Same Same Same Same

22 Assign values to variables Step Variable or Value Expected result Obtained result number selection B1 Website www.amazon.com Logon Screen B2 Email Jsmith@hotmail.com - B2 Password Johnsm Main Screen B3 Search string Rational List of books B4 Book selection First Book details B5 Shopping chart Shopping chart Cart contents B6 Checkout Checkout Prompt for address B7 Address Same Prompt for shipping B8 Shipping option 5 days Prompt for payment B9 Credit card Same Prompt for confirmation Traceability matrix

23 Traceability tree Traceability tree

24 Traceability tree Traceability tree

25 Suspect relationships What is being tested

26 Agenda Overview of the requirements types Traceability between requirements Actors and Use Cases How to create Test Cases from Use Cases Mapping to RUP Conclusions

27 Where in the process does it fit? Agenda Overview of the requirements types Traceability between requirements Actors and Use Cases How to create Test Cases from Use Cases Mapping to RUP Conclusions

28 Benefits of this approach Test Cases are derived in more automatic way Avoiding duplicate testing Better test coverage Easier monitoring of testing progress Easier work load balancing between testers Easier regression testing Decreasing project time by moving some tasks from construction to elaboration Contribution to early discovery of missing requirements Literature Jim Heumann, "From Use Cases to Test Cases - Ensuring Quality from the Beginning." RUC 2001. Jim Heumann, "Using Use Cases to Create Test Cases." The Rational Edge, June 2001. Dean Leffingwell and Don Widrig, Managing Software Requirements: A Unified Approach. Addison-Wesley, 1999. Dean Leffingwell and Don Widrig, The Role of Requirements Traceability in System Development, The Rational Edge, September 2002. Rational Unified Process. Rational Software Corporation, 2001.

29 Peter Zielczynski, Ph.D. PZielczynski@tact.com