path testing n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
PATH TESTING PowerPoint Presentation
Download Presentation
PATH TESTING

Loading in 2 Seconds...

play fullscreen
1 / 12

PATH TESTING - PowerPoint PPT Presentation


  • 103 Views
  • Uploaded on

PATH TESTING. An Example for White-Box Testing. 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. PROGRAM example_1

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'PATH TESTING' - tarak


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
path testing

PATH TESTING

An Example for White-Box Testing

path testing1
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
slide3
PROGRAM example_1

VAR x , y : NUMBER

BEGIN <program>

READ ( x , y );

IF ( x > 20)

THEN BEGIN <nested if>

WRITE abs ( x - y );

IF ( x < y )

THEN WRITE ( “ x smaller y ”)

ELSE WRITE ( “ x greater or equal y ” )

END <nested if>

ELSE WRITE ( “ x smaller or equal 20 ” )

END <program>

slide4

x > 20

x < y

The Flow Diagram

READ x and y

TRUE

FALSE

“abs ( x - y )”

“x smaller or equal 20”

TRUE

FALSE

“x smaller y”

“x greater or equal y”

slide5

x < y

Path 1

READ x and y

TRUE

FALSE

x > 20

“abs ( x - y )”

“x smaller or equal 20”

TRUE

FALSE

“x smaller y”

“x greater or equal y”

slide6

Path 2:

READ x and y

TRUE

FALSE

x > 20

“abs ( x - y )”

“x smaller or equal 20”

TRUE

FALSE

x < y

“x smaller y”

“x greater or equal y”

slide7

Path 3:

READ x and y

TRUE

FALSE

x > 20

“abs ( x - y )”

“x smaller or equal 20”

TRUE

FALSE

x < y

“x smaller y”

“x greater or equal y”

path 1
Path 1
  • predicate: X < 20 Y no constraints
  • test-cases: (1) X : 20 Y : 33

(2) X : 4 Y : 1

...

  • results: (1) “x smaller or equal 20”
      • (2) “x smaller or equal 20”
      • ...
path 2
Path 2
  • predicate: X > 20 X < Y
  • test-cases: (1) X : 21 Y : 22

(2) X : 103 Y : 203

...

  • results: (1) 1 ; “ x smaller y ”
      • (2) 100 ; “ x smaller y ”
      • ...
path 3
Path 3
  • predicate: X > 20 X > Y
  • test-cases: (1) X : 21 Y : 21

(2) X : 103 Y : 102

...

  • results: (1) 0 ; “ x greater or equal y ”
      • (2) 1 ; “ x greater or equal y ”
      • ...
slide11
PROGRAM example_2

VAR x , y : NUMBER

BEGIN <program>

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 <program>