1 PATH TESTING An Example for White-Box Testing. 2 Path testing a form of white box testing steps to complete: –derive the module’s flow diagram –describe.

Slides:



Advertisements
Similar presentations
Control Structures.
Advertisements

Whitebox Testing Fra: CS Fall Whitebox Testing AKA Structural, Basis Path Test Normally used at unit level Assumes errors at unit level are.
3. S/E with Control Structures 3.1 Relational Operators and Expressions 3.2 If and if-else Statements 3.3 The Type Double 3.4 Program Design with the While.
10 Software Engineering Foundations of Computer Science ã Cengage Learning.
AB 11 22 33 44 55 66 77 88 99 10  20  19  18  17  16  15  14  13  12  11  21  22  23  24  25  26  27  28.
Cubic Graphs OCR Module 8 You need Calculator, Graph Paper, Pencil & Ruler.
IMSE Week 18 White Box or Structural Testing Reading:Sommerville (4th edition) ch 22 orPressman (4th edition) ch 16.
Chapter 18 Testing Conventional Applications
SOFTWARE TESTING WHITE BOX TESTING 1. GLASS BOX/WHITE BOX TESTING 2.
Estimate: Review: Find 5/7 of 14. Draw a bar diagram. Divide it into 7 equal sections because the denominator is 7. Determine the number in each.
Testing Dr. Andrew Wallace PhD BEng(hons) EurIng
Shortest Path Algorithm This is called “Dijkstra’s Algorithm” …pronounced “Dirk-stra”
Jackson Structured Diagrams
Position, Velocity, Acceleration, & Speed of a Snowboarder.
White-Box Testing Eshcar Hillel Michael Beder. White Box Testing 2 Tutorial Outline What is White Box Testing? Flow Graph and Coverage Types Symbolic.
Flow Charts.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Defect testing l Testing programs to establish the presence of system defects.
Contents Introduction Requirements Engineering Project Management
CS /51 Illinois Institute of Technology CS487 Software Engineering Software Testing Techniques Mr. David A. Lash.
Agenda Introduction Overview of White-box testing Basis path testing
PAGES:51-59 SECTION: CONTROL1 : DECISIONS Decisions.
2.4.  A practical way to describe a circuit is to draw a circuit diagram  Uses standard symbols to represent the components and their connections.
Welcome to Phase III Understanding & Calculating Parallel Circuits This phase should only be opened if you are finished with Phase II.
D x (c) = 0 D x (x) = 1 D x (y) = 0 for y an independent variable D x (u+v) = D x (u) + D x (v) D x (uv) = u D x (v) + v D x (u) D x (u n ) = nu n-1 D.
Light-bot Name:
Basic Control Structures
1 © 2002 John Urrutia. All rights reserved. Qbasic Chapter 4 IF Statements and READ & DATA.
Section 7.4: Arc Length. Arc Length The arch length s of the graph of f(x) over [a,b] is simply the length of the curve.
Introduction to Software Testing Chapter 2.3 Graph Coverage for Source Code Paul Ammann & Jeff Offutt.
White Box Testing Arun Lakhotia University of Southwestern Louisiana P.O. Box Lafayette, LA 70504, USA
Software Construction Lecture 19 Software Testing-2.
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.
Selection Flow Charts If statements. Flow of Control The flow of control is a concept with which we’re already familiar. The concept of control relates.
Inequality Signs < means “is less than”  means “is less than or equal to” > means “is greater than”  means ”is greater than or equal to” Reading Inequalities.
White Box Testing by : Andika Bayu H.
Cyclomatic Complexity Philippe CHARMAN Last update:
Pythagoras Theorem Proof of the Pythagorean Theorem using Algebra.
ANOOP GANGWAR 5 TH SEM SOFTWARE TESTING MASTER OF COMPUTER APPLICATION-V Sem.
White Box Testing. Agenda White-box vs Black-box Program Flow Controls White-box Test Methods Exercises Complexity Q&A.
Introduction to Software Testing (2nd edition) Chapter 5 Criteria-Based Test Design Paul Ammann & Jeff Offutt
Circuit Diagrams 13.1 An electric circuit can be represented using a diagram. Each part of the circuit is represented with a symbol. By reading a circuit.
The Converse of the Pythagorean Theorem
When is testing sufficient?
WHITEBOX TESTING APPROACH
White Box Testing.
White-Box Testing Techniques II
UNIT-4 BLACKBOX AND WHITEBOX TESTING
This model represents the fraction ¾
White-Box Testing Techniques II
Fractions: Multiplying or dividing an integer by a fraction
Linear-Time Selection
Counting & Comparing Money 2 $ $ $ $.
Counting & Comparing Money $ $ $ $.
The 2nd Derivative.
SECTION 3-6 : COMPOUND INEQUALITIES
Structure Charts Agenda: What are Structure Charts
Suggested Layout ** Designed to be printed on white A3 paper.
Solving Linear Inequalities

5.5: Factoring the Sum and Difference of Two Cubes
x ≤ 4 x = 4 x = 4 Describe the unshaded region.

Notes Over 1.7 Solving Inequalities
Every number has its place!
Notes Over 1.7 Solving Inequalities
x ≤ 4 x = 4 x = 4 Describe the unshaded region.
> < > < ≥ ≤ Shot at 90% Larger Smaller Larger
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Lesson 3. Controlling program flow. Loops. Methods. Arrays.
Presentation transcript:

1 PATH TESTING An Example for White-Box Testing

2 Path testing a form of white box testing steps to complete: –derive the module’s flow diagram –describe all possible paths through the diagram (conditions, loops) –derive path predicates –derive test-cases & results per path

3 PROGRAM example_1 VAR x, y : NUMBER BEGIN READ ( x, y ); IF ( x > 20) THEN BEGIN WRITE abs ( x - y ); IF ( x < y ) THEN WRITE ( “ x smaller y ”) ELSE WRITE ( “ x greater or equal y ” ) END ELSE WRITE ( “ x smaller or equal 20 ” ) END

4 The Flow Diagram READ x and y “x smaller or equal 20” “abs ( x - y )” “x smaller y”“x greater or equal y” x > 20x < y TRUEFALSE TRUEFALSE

5 Path 1 READ x and y “x smaller or equal 20” “abs ( x - y )” “x smaller y”“x greater or equal y” x > 20 x < y TRUEFALSE TRUEFALSE

6 Path 2: READ x and y “x smaller or equal 20”“abs ( x - y )” “x smaller y”“x greater or equal y” x > 20 x < y TRUEFALSE TRUEFALSE

7 Path 3: READ x and y “x smaller or equal 20”“abs ( x - y )” “x smaller y”“x greater or equal y” x > 20 x < y TRUEFALSE TRUEFALSE

8 Path 1 predicate: X < 20Y no constraints test-cases: (1) X : 20Y : 33 (2)X : 4Y : 1... results:(1) “x smaller or equal 20” (2) “x smaller or equal 20”...

9 Path 2 predicate: X > 20X < Y test-cases: (1) X : 21Y : 22 (2)X : 103Y : results:(1) 1 ; “ x smaller y ” (2) 100 ; “ x smaller y ”...

10 Path 3 predicate: X > 20X > Y test-cases: (1) X : 21Y : 21 (2)X : 103Y : results:(1) 0 ; “ x greater or equal y ” (2) 1 ; “ x greater or equal y ”...

11 PROGRAM example_2 VAR x, y : NUMBER BEGIN READ ( x, y ); IF ( x > 20) THEN WRITE abs ( x - y ) ELSE WRITE ( “ x smaller or equal 20 “ ); IF ( x < y ) THEN WRITE ( “ x smaller y ”) ELSE WRITE ( “ x greater or equal y “) END

12 End of Section 4f