Structural testing

3,638 views
3,183 views

Published on

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,638
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
113
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Structural testing

  1. 1. Structural Testing Saranya.V AP/CSE,Sri Vidya College of Engineering & Technology, Virudhunagar
  2. 2. Test cases based upon the structure of the code under testing.Stronger than other testing methodologies.Complementary Testing:Testing strategy (A) detects some errors.Testing strategy (B) detects some more errors which is uncovered by (A). This is known as complementary testing strategy.
  3. 3. Categories of Structural TestingStatement CoveragePath CoverageBranch CoverageCondition Coverage
  4. 4. 1. Statement Coverage Weakest form of testing. Because this kind of testing requires that Begin every statement in the code has been executed at least once. yesEx: Y>=0 Y=0-yBeginIf(y>= 0) then y=0-y; NoAbc=y; Abc=yend
  5. 5. 2. Branch CoverageTest cases are generated to test each branch condition assume true or false values in turn.Also known as Edge Testing.Edge of the programs control flow graph is traversed at least once.These kind of test cases checks Branches of decision box.
  6. 6. 3. Condition Coverage Testing• Check all possible combinations of IF ("X && Y") conditions.• While branch TEST 1: X=TRUE, coverage is stronger than statement Y=FALSE coverage, its not TEST 2: X=FALSE, suitable for multiple Y=TRUE conditions checking.
  7. 7. • Example: “if (A or B)” requires 4 test cases: A = True, B = True A = True, B = False A = False, B = True A = False, B = False
  8. 8. 4. Path Coverage Testing Paths in the program executed at least once. 1 2 Independent path can be P1 F T defined in terms of CFG. White box testing is used here. P2 F Test the each independent path. T But this process will be complex one when the loop occurs.

×