White Box Testing by : Andika Bayu H.

Slides:



Advertisements
Similar presentations
Software Testing Techniques
Advertisements

Chapter 14 Software Testing Techniques - Testing fundamentals - White-box testing - Black-box testing - Object-oriented testing methods (Source: Pressman,
Software Testing Technique. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves.
Chapter 14 Testing Tactics
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.
Creator: ACSession No: 13 Slide No: 1Reviewer: SS CSE300Advanced Software EngineeringFebruary 2006 Testing - Techniques CSE300 Advanced Software Engineering.
Chapter 17 Software Testing Techniques
Software Testing Techniques. December Introduction Many aspects to achieving software quality –Formal reviews (of both the software process and.
1 “White box” or “glass box” tests “White Box” (or “Glass Box”) Tests.
IMSE Week 18 White Box or Structural Testing Reading:Sommerville (4th edition) ch 22 orPressman (4th edition) ch 16.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
BASIS PATH TESTING ● By Tom McCabe ● McCabe, T., "A Software Complexity Measure," IEEE Trans. Software Engineering, vol. SE-2, December 1976, pp
Testing an individual module
Chapter 18 Testing Conventional Applications
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Unit Testing CS 414 – Software Engineering I Don Bagert Rose-Hulman Institute of Technology January 16, 2003.
Software Engineering Lecture 12 Software Testing Techniques 1.
Cyclomatic Complexity Dan Fleck Fall 2009 Dan Fleck Fall 2009.
Software Systems Verification and Validation Laboratory Assignment 3
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Software Testing Techniques
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Software Testing The process of operating a system or component under specified conditions, observing and recording the results, and making an evaluation.
Agenda Introduction Overview of White-box testing Basis path testing
INTRUDUCTION TO SOFTWARE TESTING TECHNIQUES BY PRADEEP I.
White-box Testing.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 14a: Software Testing Techniques Software Engineering: A Practitioner’s Approach, 6/e Chapter.
Software Testing and Reliability Southern Methodist University CSE 7314.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 6/e (McGraw-Hill 2005). Slides copyright 2005 by Roger Pressman.1.
Presented by: Ritesh Jain Date: 16-Jun-05 Software Quality Testing.
1 Program Testing (Lecture 14) Prof. R. Mall Dept. of CSE, IIT, Kharagpur.
BASIS PATH TESTING.
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
White Box Testing Arun Lakhotia University of Southwestern Louisiana P.O. Box Lafayette, LA 70504, USA
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.
Chapter : 18 Testing Conventional Applications
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.1.
Chapter 23 전통적인 애플리케이션 테스팅 Testing Conventional Applications 임현승 강원대학교 Revised from the slides by Roger S. Pressman and Bruce R. Maxim for the book “Software.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Cyclomatic Complexity Philippe CHARMAN Last update:
1 Lecture 14: Chapter 18 Testing Conventional Applications Slide Set to accompany Software Engineering: A Practitioner’s Approach, 7/e by Roger S. Pressman.
CSC 395 – Software Engineering Lecture 27: White-Box Testing.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Software Testing. SE, Testing, Hans van Vliet, © Nasty question  Suppose you are being asked to lead the team to test the software that controls.
Chapter 17 Software Testing Techniques
Based on slides created by Ian Sommerville & Gary Kimura
Chapter 18 Testing Conventional Applications
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.
Software Testing.
Software Engineering (CSI 321)
Chapter 18 Testing Conventional Applications
Chapter 13 & 14 Software Testing Strategies and Techniques
Data Coverage and Code Coverage
Structural testing, Path Testing
White Box Testing.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Software Testing (Lecture 11-a)
Chapter 18 Testing Conventional Applications
Chapter 18 Testing Conventional Applications
Chapter 14 Software Testing Techniques
“White box” or “glass box” tests
Chapter 18 Testing Conventional Applications
Chapter 18 Testing Conventional Applications.
Chapter 23 Testing Conventional Applications
UNIT-4 BLACKBOX AND WHITEBOX TESTING
By: Lecturer Raoof Talal
Presentation transcript:

White Box Testing by : Andika Bayu H

Introduction White Box Testing or Glass Box Testing Test case design method that uses the control structure of the procedural design to derive test cases SW Engineer can derive test cases that guarantee that all independent paths within a module have been exercised at least once exercise all logical decisions on their true and false bounds execute all loops at their boundaries and within their operational bounds exercise internal data structures to assure their validity Why not just validate the requirement ? Logic errors and incorrect assumptions are inversely proportional to the probability that a program path will be executed We often believe that a logical path is not likely to be executed when, in fact, it may be executed on a regular basis Typographical errors are random

Basis Path/Control Structure Testing Proposed by Tom McCabe The basis path method enables the test case designer to derive a logical complexity measure of a procedural design and use this measure as a guide for defining a basis set of execution paths Flow Graph Notation:

Pseudo Code - Flow Chart Procedure Sort Flow Chart Procedure Sort 1. do while not eof 2. Read Record 3. if record field 1 = 0 4. then process record 5. store in buffer; 6. increment counter 7. else if record field 2 = 0 8. then reset counter 9. else process record 10. store in file 11. endif 12. endif 13. enddo

Flow Chart - Flow Graph Flow Chart Flow Graph

Compound Logic IF a or b then procedure X else procedure Y endif

Cyclomatic Complexity ( V(G) ) software metric that provide a quantitative measure of the logical complexity of a program] V(G) = E - N + 2 V(G) = 9 - 8 + 2 = 3 The number of regions of the flow graph correspond to the cyclomatic complexity. V(G) = P + 1, where P is the number of predicate nodes

Independent Path path 1: 1-13 path 2: 1-2-3-7-8-11-12-1-13 An independent path is any path through the program that introduces at least one new set of processing statements or a new condition An independent path must move along at least one edge that has not been traversed before the path is defined path 1: 1-13 path 2: 1-2-3-7-8-11-12-1-13 path 3: 1-2-3-7-9-10-11-12-1-13 path 4: 1-2-3-4-5-6-12-1-13 Is the path 1-2-3-4-5-6-12-1-2-3-7-8-11-12-1-13 an independent path ?

Deriving Test Cases Draw a corresponding flowgraph using the design or code as a foundation Determine the cyclomatic complexity of the resultant flow graph (V(g)) Determine a basis set of linearly independent paths Prepare test cases that will force execution of each path in the basis set if we have 6 independent paths, then we should have at least 6 test cases. For each test cases, we should define the input conditions and the expected result.

Graph Matrices Can automate derivation of flow graph and determination of a set of basis paths. Software tools to do this can use a graph matrix. Graph matrix: is square with #sides equal to #nodes Rows and columns correspond to the nodes Entries correspond to the edges. Can associate a number with each edge entry. Use a value of 1 to calculate the cyclomatic complexity For each row, sum column values and subtract 1. Sum these totals and add 1.

Some other interesting link weights: Probability that a link (edge) will be executed Processing time for traversal of a link Memory required during traversal of a link Resources required during traversal of a link

Loop Testing Loop is fundamental to many algorithms. Loop can be defined as simple, concatenated, nested, and unstructured.

Loop Testing (2) Simple Loops of size n: Nested Loops To test: Simple Loops of size n: Skip loop entirely Only one pass through loop Two passes through loop m passes through loop where m<n. (n-1), n, and (n+1) passes through the loop. Nested Loops Start with inner loop. Set all other loops to minimum values. Conduct simple loop testing on inner loop. Work outwards Continue until all loops tested. Concatenated Loops If independent loops, use simple loop testing. If dependent, treat as nested loops. Unstructured loops Don't test - redesign.