1 Graph Coverage (6). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section 2.6 2.

Slides:



Advertisements
Similar presentations
Chapter 4: Requirements Engineering
Advertisements

Withdrawal Transaction Use Case Primary Actor: Customer Pre-conditions: The customer must have a valid ATM card and PIN. Post-conditions: The customer.
Use Case Diagrams Damian Gordon.
Use Case & Use Case Diagram
Lecture 10 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 7 – More on use cases and activity diagrams.
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
Use Case Modeling SJTU. Unified Modeling Language (UML) l Standardized notation for object-oriented development l Needs to be used with an analysis and.
USE CASE – ATM EXAMPLE Actors: ATM Customer ATM Operator Use Cases: The customer can withdraw funds from a checking or savings account query the balance.
SWE 214 (071) Use Case Diagrams Slide 1 Use Case Diagrams Examples.
ATM Case Study A Discussion.
Extending the Requirements Model - techniques for detailing use cases
CPSC 333: Foundations of Software EngineeringJ. Denzinger Small Test: Bank account manager System has to run on an automated teller machine. User must.
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
Lecture 8 Electronic Commerce Modelling Techniques
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Sequence Diagrams. Introduction A Sequence diagram depicts the sequence of actions that occur in a system. The invocation of methods in each object, and.
CS3773 Software Engineering Lecture 03 UML Use Cases.
Software Modeling Jerry Lebowitz.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Chapter 12 ATM Case Study, Part 1: Object-Oriented Design with the UML
Tutorial 2. What is a UML Use Case Diagram? Use case diagrams model the functionality of a system using actors and use cases. Use cases are services or.
January Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Elaboration Iteration 1: a simple cash-only success scenario of.
Unit 211 Requirements Phase The objective of this section is to introduce software system requirements and to explain different ways of expressing these.
Task Analysis Analyzing and representing the activities of your users.
{ How to Use An ATM A simple tutorial to teach how to use ATM Machines.
1 Lab Beginning Analysis and Design 4 Completion of first version of use case diagram initiates the processes of analysis and design. 4 UML provides.
Use Case Modeling. Use case diagram For each use case we develop  Object class diagram (with attributes only)  System sequence diagram (analysis) 
Use Cases 2 ENGR ♯10 Peter Andreae
SWE311_Ch07 (071) Software & Software Engineering Slide 1 Chapter 7 Requirements Engineering.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 25. Review Design Level Class Diagram Identifying classes/Operations/Attributes Associations – Simple associations.
Chapter 14 System Testing.
Faculty of Computer & Information Software Engineering Third year
Chapter 6 A Use-Case-Driven Process. 2 Definitions The choice of models and the choice of techniques used to express them have a significant impact on.
Faculty of Computer & Information
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
January Ron McFadyen1 January 2004 Assignment 1 Due: Friday Jan 23, Implement the ProductSpecification and Payment classes in any OO.
Unit 3 Functional Requirements. Syllabus Introduction Features and usecases Use case Scenarios Documenting use cases Levels of details SRS Document.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
1 LAB What is Collaboration diagram? 4 Collaboration diagrams illustrate the interaction between the objects, using static spatial structure. 4.
1 Requirements Engineering From System Goals to UML Models to Software Specifications Axel Van Lamsweerde.
UML - Development Process 1 Software Development Process Using UML.
Use Case Diagrams. Introduction In the previous Lecture, you saw a brief review of the nine UML diagrams. Now that you have the clear, you'll start to.
Lecture Outline Monday 23 rd February (Week 4) 3 – 3:10pm Review of Requirements Eng. and use cases 3:10 – 3:40pm Exercise on Use Case 3:40-4:40 Class.
Chapter 3: Software Design –Use case Diagram Nouf Alghanmi.
1 After the scenarios are formulated Find all the use cases in the scenario Describe each of these use cases in more detail Participating actors Describe.
UC Diagram & Scenario RKPL C & D. Using Use Case Diagram Use case diagrams are used to visualize, specify, construct, and document the (intended) behavior.
Requirements Document for the Banking System
1 Object-Oriented Static Modeling of the Banking System - III Lecture # 33.
1 Object-Oriented Static Modeling of the Banking System - II Lecture # 32.
1 Case Study and Use Cases for Case Study Lecture # 28.
Introduction What would our society be like now if we did not have ATm’s? Not able to access money when we urgently want it. You will have to go to the.
DFD(Data Flow Diagram)
Paul Ammann & Jeff Offutt
Use Case Modeling - II Lecture # 27.
Structured Analysis and Design Technique
ATM OO Design and Implementation Case Study
Storyboarding and Game Design SBG, MBG620 Full Sail University
Dynamic Modeling of Banking System Case Study - I
Object-Oriented Static Modeling of the Banking System - I
Exercices & Corrections Week 3
Use Case Modeling - techniques for detailing use cases
Concepts, Specifications, and Diagrams
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Paul Ammann & Jeff Offutt
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Using Use Case Diagrams
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Real-Time Structured Analysis and Design Technique (RSTAD)
Presentation transcript:

1 Graph Coverage (6)

Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section 2.6 2

3 Outline Graph Coverage for USE CASES ◦ Use Cases as Activity Diagrams Covering Activity Diagrams ◦ Node Coverage ◦ Edge Coverage ◦ Data Flow Coverage !!!!!!!!!

4 UML Use Cases UML use cases are often used to express software requirements They help express computer application workflow

5 Simple Use Case Example Actors : Humans or software components that use the software being modeled Use cases : Shown as circles or ovals Node Coverage : Try each use case once … Withdraw Funds Get Balance Transfer Funds ATM User Use Case graphs, by themselves, are not useful for testing

6 Elaboration Use cases are commonly elaborated (or documented) Elaboration is first written textually ◦ Details of operation ◦ Alternatives model choices and conditions during execution

7 Elaboration of ATM Use Case Use Case Name : Withdraw Funds Summary : Customer uses a valid card to withdraw funds from a valid bank account. Actor : ATM Customer Precondition : ATM is displaying the idle welcome message

8 Elaboration of ATM Use Case Description : ◦ Customer inserts an ATM Card into the ATM Card Reader. ◦ If the system can recognize the card, it reads the card number. ◦ System prompts the customer for a PIN. ◦ Customer enters PIN. ◦ System checks the card's expiration date and whether the card has been stolen or lost. ◦ If the card is valid, the system checks if the entered PIN matches the card PIN. ◦ If the PINs match, the system finds out what accounts the card can access. ◦ System displays customer accounts and prompts the customer to choose a type of transaction. There are three types of transactions, Withdraw Funds, Get Balance and Transfer Funds. (The previous eight steps are part of all three use cases; the following steps are unique to the Withdraw Funds use case.)

9 Elaboration of ATM Use Case Description (continued) : ◦ Customer selects Withdraw Funds, selects the account number, and enters the amount. ◦ System checks that the account is valid, makes sure that customer has enough funds in the account, makes sure that the daily limit has not been exceeded, and checks that the ATM has enough funds. ◦ If all four checks are successful, the system dispenses the cash. ◦ System prints a receipt with a transaction number, the transaction type, the amount withdrawn, and the new account balance. ◦ System ejects card. ◦ System displays the idle welcome message.

10 Elaboration of ATM Use Case Alternatives : ◦ If the system cannot recognize the card, it is ejected and the welcome message is displayed. ◦ If the current date is past the card's expiration date, the card is confiscated and the welcome message is displayed. ◦ If the card has been reported lost or stolen, it is confiscated and the welcome message is displayed. ◦ If the customer entered PIN does not match the PIN for the card, the system prompts for a new PIN. ◦ If the customer enters an incorrect PIN three times, the card is confiscated and the welcome message is displayed. ◦ If the account number entered by the user is invalid, the system displays an error message, ejects the card and the welcome message is displayed. ◦ If the request for withdraw exceeds the maximum allowable daily withdrawal amount, the system displays an apology message, ejects the card and the welcome message is displayed. ◦ If the request for withdraw exceeds the amount of funds in the ATM, the system displays an apology message, ejects the card and the welcome message is displayed. ◦ If the customer enters Cancel, the system cancels the transaction, ejects the card and the welcome message is displayed. Postcondition : ◦ Funds have been withdrawn from the customer's account.

11 Wait A Minute … What does this have to do with testing ? Specifically, what does this have to do with graphs ??? Remember our admonition : Find a graph, then cover it! UML has something very similar : Activity Diagrams

12 Use Cases to Activity Diagrams Activity diagrams indicate flow among activities Activities should model user level steps Two kinds of nodes: ◦ Action states ◦ Sequential branches Use case descriptions become action state nodes in the activity diagram

13 Use Cases to Activity Diagrams Alternatives are sequential branch nodes Flow among steps are edges Activity diagrams usually have some helpful characteristics: ◦ Few loops ◦ Simple predicates ◦ No obvious DU pairs

14 ATM Withdraw Activity Graph

15 Covering Activity Graphs Node Coverage ◦ Inputs to the software are derived from labels on nodes and predicates ◦ Used to from test case values Edge Coverage Data flow techniques do not apply

16 Covering Activity Graphs Scenario Testing ◦ Scenario : A complete path through a use case activity graph ◦ Should make semantic sense to the users ◦ Number of paths often finite  If not, scenarios defined based on domain knowledge  Use “specified path coverage”, where the set S of paths is the set of scenarios  Note that specified path coverage does not necessarily subsume edge coverage, but scenarios should be defined so that it does

17 Key Points Because use cases are developed early in software development, ◦ they can help the tester start testing activities ◦ Model as UML activity diagram Activity diagrams indicate flow among activities ◦ Use case descriptions become action state nodes in the activity diagram