From Use Cases to Test Cases 1. A Tester’s Perspective  Without use cases testers will approach the system to be tested as a “black box”. “What, exactly,

Slides:



Advertisements
Similar presentations
Testing Workflow Purpose
Advertisements

IT Requirements Capture Process. Motivation for this seminar Discovering system requirements is hard. Formally testing use case conformance is hard. We.
Actors and use cases Use-case diagram Brief notation Prioritization Fully dressed notation Requirements Functional requirements  Use-cases.
Gerhard Dueck -- CS3013Capturing Requirements as Use Cases 1 Capturing the Requirements as use Cases  Requirements Description  We need to describe –The.
Use-case Modeling.
Systems Analysis and Design in a Changing World, Fourth Edition
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
The Unified Software Development Process - Workflows Ivar Jacobson, Grady Booch, James Rumbaugh Addison Wesley, 1999.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Use cases and requirement specification - 1 Use case diagrams 3 use cases System boundaries Remember: Use case diagramming is a tool, not the requirements.
1 Software Testing and Quality Assurance Lecture 15 - Planning for Testing (Chapter 3, A Practical Guide to Testing Object- Oriented Software)
Bina Nusantara 7 C H A P T E R MODELING SYSTEM REQUIREMENTS WITH USE CASES.
NJIT Drawing System Sequence Diagrams Chapter 10 Applying UML and Patterns Craig Larman Presented by Anuradha Dharani.
1 Software Testing and Quality Assurance Lecture 14 - Planning for Testing (Chapter 3, A Practical Guide to Testing Object- Oriented Software)
Recall The Team Skills Analyzing the Problem
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
High Level: Generic Test Process (from chapter 6 of your text and earlier lesson) Test Planning & Preparation Test Execution Goals met? Analysis & Follow-up.
1 CSc Senior Project Software Testing. 2 Preface “The amount of required study of testing techniques is trivial – a few hours over the course of.
Test Design Techniques
TK2023 Object-Oriented Software Engineering CHAPTER 6 SYSTEM SEQUENCE DIAGRAMS.
What is Business Analysis Planning & Monitoring?
System/Software Testing
RUP Requirements RUP Artifacts and Deliverables
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 4: Detailing a Use Case.
1 Object-Oriented Testing CIS 375 Bruce R. Maxim UM-Dearborn.
Introduction Telerik Software Academy Software Quality Assurance.
RUP Implementation and Testing
FCS - AAO - DM COMPE/SE/ISE 492 Senior Project 2 System/Software Test Documentation (STD) System/Software Test Documentation (STD)
1 Software testing. 2 Testing Objectives Testing is a process of executing a program with the intent of finding an error. A good test case is in that.
SWE © Solomon Seifu CONSTRUCTION. SWE © Solomon Seifu Lesson 13-2 Testing.
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
Testing Workflow In the Unified Process and Agile/Scrum processes.
Software Engineering Chapter 7 Fall Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts.
Software Testing Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Requirements Capture. Four Steps of requirements capture List candidate requirements Understand system context Capture functional requirements Capture.
Notes of Rational Related cyt. 2 Outline 3 Capturing business requirements using use cases Practical principles  Find the right boundaries for your.
Software Construction Lecture 18 Software Testing.
UML-1 8. Capturing Requirements and Use Case Model.
® IBM Software Group © 2006 IBM Corporation Writing Good Use Cases Module 1: Introduction to Use-Case Modeling.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
Yarmouk University Department of Computer Information Systems CIS 499 Yarmouk University Department of Computer Information Systems CIS 499 Yarmouk University.
2131 Structured System Analysis and Design By Germaine Cheung Hong Kong Computer Institute Lecture 8 (Chapter 7) MODELING SYSTEM REQUIREMENTS WITH USE.
1 Capturing Requirements As Use Cases To be discussed –Artifacts created in the requirements workflow –Workers participating in the requirements workflow.
Drawing System Sequence Diagrams
Use Case Diagram The purpose is to communicate the system’s functionality and behaviour to the customer or end user. Mainly used for capturing user requirements.
Use Case Driven Analysis Requirements Use Case Use Case Description System Sequence Diagram Chapter 5.
CPSC 873 John D. McGregor Session 9 Testing Vocabulary.
Systems Analysis and Design in a Changing World, Fourth Edition
Moving from “lots of Requirements” to “organized Product Design” Product Design ? User/Market/Business “Requirements” May be in various forms May also.
Applying Use Cases to Implementation (Chapters 25,26 - Requirements Text) Steve Chenoweth & Chandan Rupakheti Question 1.
CPSC 871 John D. McGregor Module 8 Session 1 Testing.
UML - Development Process 1 Software Development Process Using UML.
21/1/ Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design.
Refining the Use Cases 1. How Use Cases Evolve  Early efforts typically define most of the major use cases.  The refining stages complete the process.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
What is a software? Computer Software, or just Software, is the collection of computer programs and related data that provide the instructions telling.
CPSC 372 John D. McGregor Module 8 Session 1 Testing.
1 Team Skill 3 Defining the System Part 1: Use Case Modeling Noureddine Abbadeni Al-Ain University of Science and Technology College of Engineering and.
Systems Analysis and Design in a Changing World, Fourth Edition
John D. McGregor Session 9 Testing Vocabulary
Recall The Team Skills Analyzing the Problem
Software Requirements
John D. McGregor Session 9 Testing Vocabulary
John D. McGregor Session 9 Testing Vocabulary
Applying Use Cases (Chapters 25,26)
Applying Use Cases (Chapters 25,26)
Software Development Process Using UML Recap
Presentation transcript:

From Use Cases to Test Cases 1

A Tester’s Perspective  Without use cases testers will approach the system to be tested as a “black box”. “What, exactly, is this system supposed to do, and in what order is it supposed to do it?” “What are all the things that can go wrong with the system, and how is the system supposed to behave when this happens?” “How can I create and record a set of testing scenarios in which I can put this system through its paces?” “How will I know when I’ve tested the system completely and thoroughly?” “Is there anything else this system is supposed to do, or not do, that I need to know about?” 2

A Tester’s Perspective (Cont’d)  If the requirements were developed using a use case approach, the testers will have: A comprehensive set of use cases that documents an ordered sequence of events describing how the system interacts with the user and how it delivers its results to that user. A use-case model that documents all the use cases for the system, as well as how they interact and what actors drive them. Within each use case, both a basic flow of events and alternate flows that define what the system does in other situations. Descriptions of pre-conditions and post-conditions. A supplementary specification that defines the nonfunctional requirements of the system.  The use-case approach technique builds a set of assets that can directly drive the testing process. 3

Common Testing Terms  A test plan contains information about the purpose and goals of testing and identifies strategies to be used in testing.  A test case is a set of test inputs, execution conditions, and expected results developed for a particular objective (e.g., to verify compliance with a specific requirement).  A test procedure is a set of detailed instructions for the setup, execution, and evaluation of results for a given test case.  A test script is a software script that automates the execution of a test procedure (or portion of).  Test coverage defines the degree to which a given test or set of tests address all specified test cases for a given system component.  A test item is a build that is an object of testing.  Test results are a repository of data captured during the execution of a test used in analyzing test results. 4

Use Case Scenarios  A scenario, or an instance of a use case, is a use case execution wherein a specific user executes the use case in a specific way.  Each possible sequence of flows in a use case is a separate scenario. 5

Steps in Deriving Test Cases from Use Cases 1. Identify the use case scenarios. 2. For each scenario, identify one or more test cases. 3. For each test case, identify the conditions that will cause it to execute. 4. Complete the test case by adding data values. 6

Step 1: Identify the Use Case Scenarios  You can construct a matrix to construct all possible combinations of basic and alternate flows.  Be aware that it is possible that not all possible scenarios are described in the original use case.  The process is iterative and may require changes in the design and/or the requirements specification. 7

Step 2: Identify the Test Cases  For each scenario specify one or more test cases.  Each test case should include the parameters of the test to be conducted, including the conditions of the test and the expected results. 8

Step 3: Identify the Test Conditions  For each test case identify what conditions cause the execution of a specific event or sequence of events within a use case?  For each condition indicate which of the following three states would cause execution of the test case: Valid (V) indicates a condition that must be true for the basic flow to execute. Invalid (I) indicates a condition that will invoke the alternate flow, causing a specific scenario to occur. Not applicable (N/A) indicates that an identified condition is not applicable to that test case. 9

Step 4: Add Data Values to Complete the Test Case  Real data must be provided as necessary to be able to execute the test cases.  Make sure also that the test cases address any special requirements (minimum/maximum performance, loads, or data volumes) defined for the use case. 10

Managing the Test Coverage  For most applications, testing all use cases at this level of thoroughness is not practical. Consider the following guidelines for choosing use cases to test. Select the most appropriate or critical use cases for the most thorough testing. E.g., primary user interfaces, those architecturally significant or have potential for causing significant problems if incorrect. Choose each use case to test based on a balance between the cost, risk, and necessity for verification. Determine the relative importance of your use cases by using a priority algorithm specific to your context. 11

Black-Box versus White-Box Testing with Use Cases  Can use cases help with white-box testing? 12