SOFTWARE PRESENTATION ON Path Testing And Decision To Decision Path

Slides:



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

Nested if-else Statements.  Should be indented to make the logic clear.  Nested statement executed only when the branch it is in is executed. For example,
Path Analysis Why path analysis for test case design?
Chapter 6 Path Testing 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.
Nov R McFadyen1 A Traditional Software Development Process Unit test Integration test System test Detailed design Architectural design Analysis.
1 CSE1301 Computer Programming: Lecture 15 Flowcharts and Debugging.
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 18 Testing Conventional Applications
Software Testing and QA Theory and Practice (Chapter 4: Control Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
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.
Cyclomatic Complexity Dan Fleck Fall 2009 Dan Fleck Fall 2009.
Software Systems Verification and Validation Laboratory Assignment 3
Class Specification Implementation Graph By: Njume Njinimbam Chi-Chang Sun.
CMSC 345 Fall 2000 Unit Testing. The testing process.
9/18/2015CPSC , CPSC , Lecture 121 Software Engineering, CPSC , CPSC , Lecture 12.
CS4311 Spring 2011 Unit Testing Dr. Guoqiang Hu Department of Computer Science UTEP.
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.
Agenda Introduction Overview of White-box testing Basis path testing
Software Testing. 2 CMSC 345, Version 4/12 Topics The testing process  unit testing  integration and system testing  acceptance testing Test case planning.
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.
Unit Testing 101 Black Box v. White Box. Definition of V&V Verification - is the product correct Validation - is it the correct product.
INTRUDUCTION TO SOFTWARE TESTING TECHNIQUES BY PRADEEP I.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
White-box Testing.
Summarizing “Structural” Testing Now that we have learned to create test cases through both: – a) Functional (blackbox)and – b) Structural (whitebox) testing.
1 Program Testing (Lecture 14) Prof. R. Mall Dept. of CSE, IIT, Kharagpur.
BASIS PATH TESTING.
WHITE BOX TESTING IS4500 Copyright © 2012 by The Cathris Group and Martin J. Schedlbauer. All Rights Reserved. Do Not Duplicate or Distribute Without Written.
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.
Software Construction Lecture 19 Software Testing-2.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
White Box Testing by : Andika Bayu H.
Structural (White-Box) Testing Software Testing Module Dr. Samer Hanna.
1 CSE1301 Computer Programming: Lecture 16 Flow Diagrams and Debugging.
Dynamic White-Box Testing What is code coverage? What are the different types of code coverage? How to derive test cases from control flows?
White-Box Testing Statement coverage Branch coverage Path coverage
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
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.
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.
Control Flow Testing Handouts
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
Software Engineering (CSI 321)
Decisions Chapter 4.
Outline of the Chapter Basic Idea Outline of Control Flow Testing
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.
Structural testing, Path Testing
Types of Testing Visit to more Learning Resources.
White Box Testing.
White-Box Testing.
Paul Ammann & Jeff Offutt
CHAPTER 4 Test Design Techniques
Chapter 9 Path Testing–Part 1
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Chapter 14 Software Testing Techniques
“White box” or “glass box” tests
Karnaugh Maps Topics covered in this presentation: Karnaugh Maps
Structured Program
Paul Ammann & Jeff Offutt
Whitebox Testing.
LOOPS The loop is the control structure we use to specify that a statement or group of statements is to be repeatedly executed. Java provides three kinds.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
By: Lecturer Raoof Talal
Unit III – Chapter 3 Path Testing.
Presentation transcript:

SOFTWARE PRESENTATION ON Path Testing And Decision To Decision Path

Group Member - Payal Nigam Akash Deep Jain Abhilash Panday Aarushi Gupta Vanshaj Dixit

Path Testing Path Testing is a structural testing method based on the source code or algorithm and NOT based on the specifications. It is a structured testing or white box testing technique used for designing test cases intended to examine all possible paths of execution at least once

Path Testing Techniques: Control Flow Graph (CFG) - The Program is converted into Flow graphs by representing the code into nodes, regions and edges. Decision to Decision path (D-D) - The CFG can be broken into various Decision to Decision paths and then collapsed into individual nodes. Independent paths - Independent path is a path through a DD-path graph which cannot be reproduced from other paths by other methods

Decision-to-Decision (DD) path Graph A decision-to-decision path, or DD-path, is a path of execution (usually through a flow graph representing a program, such as a flow chart) between two decisions. More recent versions of the concept also include the decisions themselves in their own DD-paths.

Properties From the definition we can conclude the following: Every node on a flow graph of a program belongs to one DD-path. If the first node on a DD-path is traversed, then all other nodes on that path will also be traversed. The DD path graph is used to find independent path for testing. Every statement in the program has been executed at least once.

When we have a flow graph, we can easily draw another graph that is known as decision-to-decision or (DD) path graph, wherein we lay our main focus on the decision nodes only. The nodes of the flow graph are combined into a single node it they are in sequence.

Path Testing: Independent Paths  How you can calculate the number of independent paths through any structured system?

Nodes = Decisions + Processes Nodes are where anything can happen and so the full count of nodes are those places where decisions are being made and those places where a specific algorithm or bit of logic is being performed. There are then three equations that you can use to calculate the independent paths. Independent Paths = Edges – Nodes + 2 Independent Paths = Regions + 1 Independent Paths = Decisions + 1

Independent Paths = Edges - Nodes + 2 Independent Paths = 7 - 6 + 2 On the basis of Nodes Independent Paths = Edges - Nodes + 2 Independent Paths = 7 - 6 + 2 Independent Paths = 3 On the basis of regions Independent Paths = Regions + 1 Independent Paths = 2 + 1 Independent Paths =3 On the basis of decisions Independent Paths = Decisions + 1

Example: Program to calculate gcd public class gcd {   public static void main(String[] args) {     float x = Float.valueOf(args[0]);     float y = Float.valueOf(args[1]);     while (x != y) {       if (x > y)         x = x - y;       else y = y - x;     }     System.out.println("GCD: " + x);   } }

On the basis of nodes Independent Paths = Edges - Nodes +2 Independent Paths = 8 - 7 + 2 Independent Paths = 3 On the basis of decisions Independent Paths = Decisions +1 Independent Paths = 2 + 1 On the basis of regions Independent Paths = Regions +1 Here are some tests: x = 1, y = 1 x = 1, y = 2 x = 2, y = 1 With that test data set… Test Case 1: Covers path 1, 6 Test Case 2: Covers path 1,2,3,4,5,1,6 Test Case 3: Covers path 1,2,4,5,1,6

Process of constructing the DD Graph goes like this: Step – 1: Start writing the following C – program # include (1) int main ( ) (2) { (3) int a, b, c, boolean = 0; (4) printf ("nt Enter side-a :"); (5) scanf ("%d", & a); (6) printf("nt Enter side-b :"); (7) scanf ("%d", & b);

(8) printf ("nt Enter side-c:"); (9) scanf (‘'%d", & c); (10) if ((a > 0) && (a < - 100) && (b > 0) && (b < . 100) && (c > 0) && (c < =100)) { (11) if ((a + b) > c) && ((c + a) > b) && ((b + c) > a)) { (12) boolean = 1; (13) } (14) } (15) else { (16) boolean = -1; (17) } (18) if (boolean = = 1) { (19) if ((a = =b) && (b = =c)) { (20) printf ("Triangle is equilateral"); (21) } (22) else if ((a = =b) I I (b = = c) I I (c = = a)) {

(23) print ("Triangle is isosceles"); (24) } (25) else { (26) printf("Triangle is scalene”); (27) } (28) } (29) else if (boolean = = 0) { (30) printf ("Not a triangle"); (31) } (32) else (33) printf ("n invalid input range"); (34) } (35) getch ( ); (36) return -1; (37) }

Step – 2: Draw the following Flow Graph

Step – 3: Draw the following DD Path Graph Since, nodes 1-9 are sequential nodes in the above flow graph, hence they are merged together as a single node – “a”. Likewise we can go on deciding the merging of nodes & arrive at the following DD Path Graph

Independent paths are: ABCDEGHIMQR AABCEGHJKMQR ABCEGHJLMQR ABFGNOQR ABFGNPQR ABFGHIMQR ABFGHJKMQR ABFGHJLMQR

Conclusions from the above: Conclusion – 1: Each of these paths consists of at least one new edge. Hence this basis set of paths is NOT unique.  Conclusion – 2: Test cases should be designed for the independent path execution as identified above.   Conclusion – 3: We must execute these paths at least once in order to test the program thoroughly.

Consider the problem for the determination of the nature of roots of a quadratic equation. Draw the flow graph and DD path graph. Also find independent paths from the DD Path graph.

Flow Graph

DD Path graph

The mapping table for DD path graph is:

Thank You