Dynamic Black-Box Testing Part 2

Slides:



Advertisements
Similar presentations
Chapter 4: Requirements Engineering
Advertisements

Test Design Overview.
Software Testing and Quality Assurance
Testing and Test Case Development A “primitive” method of testing, with NO test preparation, may include the following steps : – Initiate the system –
Black Box Testing Csci 565 Spring 2009.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
 After the 7 transactions, the ledger looks like Page 105 Figure 4.5. (Show On the White board)  There are 10 accounts in the ledger.  How do you calculate.
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
MIS 325 PSCJ. 2  Business processes can be quite complex  Process model: any abstract representation of a process  Process-modeling tools provide a.
Testing in the Small (aka Unit Testing, Class Testing)
Information System Design IT60105
Introduction to Software Testing Chapter 2.6 Graph Coverage for Use Cases Paul Ammann & Jeff Offutt
Sequence Diagrams. Introduction A Sequence diagram depicts the sequence of actions that occur in a system. The invocation of methods in each object, and.
Testing dan Implementasi Sistem materi 4
Interaction Diagrams Activity Diagram State Machine Diagram
January Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Elaboration Iteration 1: a simple cash-only success scenario of.
Testing an individual module
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
Modeling the Processes and Logic
1 Recap Database: –collection of data central to some enterprise that is managed by a Database Management System –reflection of the current state of the.
1 Software Testing and Quality Assurance Lecture 27 – Testing State Transition Diagrams.
Test Design Techniques
CS 325: Software Engineering March 31, 2015 Software Testing Black-Box Testing White-Box Testing Regression Testing.
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
Chapter 3 Use Cases.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Let us start from the V-Model Verification Phases Requirements analysis System Design Architecture Design Module Design Coding Validation phases Unit.
Introduction Telerik Software Academy Software Quality Assurance.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
Software Transition Testing Presented By: Varun Phanda
Sample Problems for Testing
Software testing techniques Software testing techniques Equivalence partitioning Presentation on the seminar Kaunas University of Technology.
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
Black-box Testing.
CS 217 Software Verification and Validation Week 7, Summer 2014 Instructor: Dong Si
1 Graph Coverage (6). Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Section
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
Scenario A scenario is a sequence of steps describing an interaction between a user and a system. Use case is a set of scenarios tied together by a common.
Information Systems Engineering Activity Diagram 1.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
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.
Black Box Unit Testing What is black-box testing? Unit (code, module) seen as a black box No access to the internal or logical structure Determine.
Dynamic White-Box Testing What is code coverage? What are the different types of code coverage? How to derive test cases from control flows?
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 5 Modeling the Processes and Logic.
UC Diagram & Scenario RKPL C & D. Using Use Case Diagram Use case diagrams are used to visualize, specify, construct, and document the (intended) behavior.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
Testing Integral part of the software development process.
Dynamic Black-Box Testing Part 1 What is dynamic black-box testing? How to reduce the number of test cases using: Equivalence partitioning Boundary value.
CIS 115 All Exercises Devry University (Devry) FOR MORE CLASSES VISIT CIS 115 All Exercises Devry University.
Testing dan Implementasi Sistem materi 4
Paul Ammann & Jeff Offutt
Output “Funds not available”
Software Testing.
Decision Table Testing
World Travel, Inc. Concur Online User Guide
Decision Table Based Testing
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Use Case Modeling - techniques for detailing use cases
UML State machine diagram
Static Testing Static testing refers to testing that takes place without Execution - examining and reviewing it. Dynamic Testing Dynamic testing is what.
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Testing techniques and methods
Information Systems Engineering
Test Design Techniques Software Testing: IN3240 / IN4240
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Presentation transcript:

Dynamic Black-Box Testing Part 2 • How to reduce the number of test cases using: Decision Tables State Transition

Black-box Testing There are four specification-based or black-box techniques: Equivalence partitioning Boundary value analysis State transition testing Decision tables Focused on business logic or business rules. The techniques of equivalence partitioning and boundary value analysis are often applied to specific situations or inputs. However, if different combinations of inputs result in different actions being taken, this can be more difficult to show using equivalence partitioning and boundary value analysis

State Transition Testing A black box test design technique in which test cases are designed to execute valid and invalid state transitions Finite state system: system where you get a different output for the same input, depending on what has happened before Shown as a state diagram

State Testing A software state is a condition or mode that the software is currently in A software tester must test a program's states and the transitions between them. to verify the program's logic flow through its various states Example Windows Paint program All the tools, menu items, colors are states Whenever you select one of these and make the software change its look, its menus, or its operation, you're changing its state It's usually possible to visit all the states The difficulty is that except for the simplest programs, it's often impossible to traverse all paths to all states.

State Transition Testing A state transition model has four basic parts: The states that the software may occupy (shown as circles) The transitions from one state to another (lines with arrows) The events that cause a transition (text near the transitions) The actions that result from a transition

Example Entering a Personal Identity Number (PIN) to a bank account Other events: cancel , time-out

State Transition Testing Deriving test cases Test case for every normal situation Visit each state at least once Test the state-to-state transitions that look like the most popular (frequently used) Test all the error states and returning from the error states Test the least common paths between states Test random state transitions

State Table A table showing the resulting transitions for each state combined with each possible event, showing both valid and invalid transitions List states as rows List all possible events as columns Each cell will indicate which state the system will move to, when the corresponding event occur at some state. Negative test conditions will attempt invalid transitions

State Table Invalid PIN Valid PIN Insert card - S2 S1) Start State S3 S6 S2) Wait for PIN S4 S3) 1st try invalid S5 S4) 2nd try invalid S7 S5) 3rd Try invalid ? S6) Access to account S1 (for new card) S7) Eat card State table for PIN example

Airline Reservations System I call Southwest Airlines to make a reservation. I provide information about the origin and destination of my travel, and the date and time that I wish to fly. A reservation is made for me and stored in their system. My reservation is now in the "Made" state. Depending on the various fare rules, I'm given a certain amount of time to pay for the ticket. It could be within 24 hours; or it might be until 1 hour before departure. Once I pay for the ticket, my reservation changes state. It's now "Paid". On the day of travel, I arrive at the airport in plenty of time, stand in the incredibly long lines, and get a printed copy of my ticket. The reservation is now in the "Ticketed" state. When I give my ticket to the agent and get on the plane, the reservation changes to the "Used" state. Of course, I can cancel my reservation at any time before I get on the plane. If I've paid for it, I should be able to get a refund or at least a credit.

Airline Reservations System

Quiz What should state transition diagrams show? Draw the state transition diagram for the process of withdrawing from a bank ATM

Decision Tables A black box test design technique in which test cases are designed to execute the combinations of inputs and/or stimuli (causes) shown in a decision table Provide a systematic way of stating complex business rules Can be used by analysts, developers and testers

Decision Table Help testers explore the effects of combinations of different inputs and other software states that must correctly implement business rules. Testing all combinations may be impractical if not impossible. So, test a subset of combinations But making the choice of which combinations to test is what makes it effective

Using Decision Tables Identify a suitable function or subsystem which reacts according to a combination of inputs or events (not too many inputs) Identify the aspects that need to be combined, then you put them into a table Identify all of the combinations of True and False Number of combinations= 2^ number of aspects Identify expected outcome for each combination

Using Decision Tables 5. Finally, write test cases to exercise each of the rules in decision table.

Decision Table Example If you are a new customer and you want to open a credit card account then you will get a 15% discount on all your purchases today. If you are an existing customer and you hold a loyalty card, you get a 10% discount. If you have a coupon, you can get 20% off today (but it can’t be used with the ‘new customer’ discount). Discount amounts are added, if applicable.

Decision Table Example

Decision Table Example Note that we have put X for the discount for two of the columns (Rules 1 and 2) – this means that this combination should not occur. You cannot be both a new customer and also holding a loyalty card We would have one test for each column or rule of our decision table If time-constrained, we may not have time to test all combinations full table helps us to decide which combinations to test

Quiz Scenario: If you hold an “over 60” rail card, you get a 34% discount on whatever ticket you buy. If you are travelling with a child (under 16), you can get a 50% discount on any ticket if you hold a family rail card, otherwise you get a 10% discount. You can only hold one type of rail card. Produce a decision table showing all combinations of fare types and resulting discounts and derive test cases from the decision table