Chapter 9: Path Testing Csci 565 Spring 2009. Objectives  Decision-to-decision path (DD-Paths)  Test Coverage Metrics  Basis Path Testing  Observation.

Slides:



Advertisements
Similar presentations
Chapter 14 Software Testing Techniques - Testing fundamentals - White-box testing - Black-box testing - Object-oriented testing methods (Source: Pressman,
Advertisements

Chapter 14 Testing Tactics
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Lecture 11 Instructor Paulo Alencar.
1 Ivan Marsic Rutgers University LECTURE 15: Software Complexity Metrics.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
David Woo (dxw07u).  What is “White Box Testing”  Data Processing and Calculation Correctness Tests  Correctness Tests:  Path Coverage  Line Coverage.
Software engineering for real-time systems
White Box Testing Techniques Dynamic Testing. White box testing(1) Source code is known and used for test design While executing the test cases, the internal.
Chapter 8: Path Testing Csci 565.
Fall, 2006SW Eng Standalone Progs, Univ of Colorado Boulder 1 Wk 11 Glass Box Testing, Flow Graphs, Test Coverage SW Engineering of Standalone Programs.
1 Software Testing and Quality Assurance Lecture 15 - Planning for Testing (Chapter 3, A Practical Guide to Testing Object- Oriented Software)
IMSE Week 18 White Box or Structural Testing Reading:Sommerville (4th edition) ch 22 orPressman (4th edition) ch 16.
EE694v-Verification-Lect5-1- Lecture 5 - Verification Tools Automation improves the efficiency and reliability of the verification process Some tools,
DAIMI(c) Henrik Bærbak Christensen1 White-box Testing Let us open the box...
Path testing Path testing is a “design structural testing” in that it is based on detailed design & the source code of the program to be tested. The methodology.
Test coverage Tor Stålhane. What is test coverage Let c denote the unit type that is considered – e.g. requirements or statements. We then have C c =
1 The Relationship of Cyclomatic Complexity, Essential Complexity and Error Rates Mike Chapman and Dan Solomon
Cyclomatic Complexity Dan Fleck Fall 2009 Dan Fleck Fall 2009.
White Box Testing.  Path yang berbeda dalam modul software akan dibentuk oleh pilihan kondisional statement seperti IF-THEN-ELSE atau DO WHILE atau DO.
Software Systems Verification and Validation Laboratory Assignment 3
White Box vs. Black Box Testing Tor Stålhane. What is White Box testing White box testing is testing where we use the info available from the code of.
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Lecture 9 Instructor Paulo Alencar.
Path Testing + Coverage Chapter 9 Assigned reading from Binder.
CS4311 Spring 2011 Unit Testing Dr. Guoqiang Hu Department of Computer Science UTEP.
Reference Paulo Alencar, University of Waterloo Frank Tsui, Southern Polytechnic State University.
1 Software Testing & Quality Assurance Lecture 10 Created by: Paulo Alencar Modified by: Frank Xu.
Agenda Introduction Overview of White-box testing Basis path testing
1 Software Testing. 2 Path Testing 3 Structural Testing Also known as glass box, structural, clear box and white box testing. A software testing technique.
1 Software Testing & Quality Assurance Lecture 14 Created by: Paulo Alencar Modified by: Frank Xu.
Lec 06 Path Testing Part II - 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 06 – Path Testing Part II 9/16/
BASIS PATH TESTING.
Software Metrics.
White Box and Black Box Testing
Chapter 8 Path Testing. Path testing Path testing is a “design structural testing” in that it is based on detailed design & the source code of the program.
White Box Testing Arun Lakhotia University of Southwestern Louisiana P.O. Box Lafayette, LA 70504, USA
Overview Structural Testing Introduction – General Concepts
1 Ivan Marsic Rutgers University LECTURE 15: Software Complexity Metrics.
Theory and Practice of Software Testing
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
White Box Testing by : Andika Bayu H.
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
Structural Coverage. Measurement of structural coverage of code is a means of assessing the thoroughness of testing. Such metrics do not constitute testing.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
CHAPTER 9 - PART 2 Software Testing Strategies. Lesson Outlines ■ White box testing – Data processing and calculation correctness tests – Correctness.
CS223: Software Engineering Lecture 26: Software Testing.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
White Box Testing. Agenda White-box vs Black-box Program Flow Controls White-box Test Methods Exercises Complexity Q&A.
Structure Based Test Design
Introduction to Software Testing (2nd edition) Chapter 5 Criteria-Based Test Design Paul Ammann & Jeff Offutt
BASIS PATH TESTING.
Software Testing.
White-Box Testing Pfleeger, S. Software Engineering Theory and Practice 2nd Edition. Prentice Hall, Ghezzi, C. et al., Fundamentals of Software Engineering.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
Cyclomatic complexity
Software Engineering (CSI 321)
Data Coverage and Code Coverage
CONTROL FLOW TESTING.
Structural testing, Path Testing
White Box Testing.
White-Box Testing.
Chapter 9 Path Testing–Part 1
Dataflow Testing G. Rothermel.
Software Engineering Lecture #39
LECTURE 15: Software Complexity Metrics
White-Box Testing.
Structural Coverage.
Test coverage Tor Stålhane.
White-Box Testing Techniques I
Structural Coverage.
Unit III – Chapter 3 Path Testing.
Presentation transcript:

Chapter 9: Path Testing Csci 565 Spring 2009

Objectives  Decision-to-decision path (DD-Paths)  Test Coverage Metrics  Basis Path Testing  Observation on McCabe Basis Path Method  Essential Complexity

t f t f f f f

Test Selection Criteria (white box)  Test Selection Criteria  Help us to measure the adequacy of a test suite  E.g. if we use statement coverage to test 40% of the code, it means 60 percent of code was never executed  Help us to decide when to stop testing  E.g., use other criteria to cover 85%

Overview of the families of test selection criteria  Families of test selection criteria include  Structural model coverage criteria  All statements (AS),  All Decisions (AD),  All paths (AP)  AP  AD  AS  Condition coverage (CC)  A test set achieves CC when each condition in the program is tested with a true result and false results  Decision/CC (D/CC)  A test set achieves D/CC when it achieves both AD and CC  Multiple condition coverage (MCC)  A test set achieves MCC if it exercises all possible combinations of condition outcomes in each decision  For N conditions, it requires 2 N tests

Basis Path Testing

ex1= p2+p3-p1 Ex1= (1,0,1,2,0,0,0,0,1,0) +(1,0,0,0,1,0,0,1,0,1)-(1,0,0,1,0,0,0,0,1,0) Ex1 = (1,0,1,1,1,0,0,1,0,1)=A,B,C,B,E,F,G ex2=2p2-p1 Ex2=(2,0,2,4,0,0,0,0,2,0) – (1,0,0,1,0,0,0,0,1,0)= (1,0,2,3,0,0,0,0,1,0)=A,B,C,B,C,B,C,G

McCabe’s Algorithmic Procedure  McCable’s Algorithmic Procedure can be used to identify a set of basis paths  Select a path with highest number of decision nodes  Retrace each decision in baseline path  Flip each decision to create a new path  E.g.  P1: A,B,C,B,E,F,G  A,D,E,F,G (flip p1 at A)  A,,B,E,F,G (flip p1 at B)  A,B,C,G (flip p1 at C)

Observations on McCabe’s Basis Path Is testing Basis path enough? Infeasible paths

Essential Complexity V(G)=1  wellStr(P) V(G) >=10 requires substantial testing Use the characteristics of code to select appropriate criteria

Reference  Material in this presentation is taken from the following resources:  Paul C. Jorgensen. Software Testing: A Craftsman’s Approach, 3 rd Edition. Auerbach Publication, 2008