Fundamental Path Selection Criteria in Software Testing

Fundamental Path Selection Criteria

  • There are many paths between the entry and exit of a typical routine
  • Every decision doubles the number of potential paths. And every loop multiplies the number of potential paths by the number of different iteration values possible for the loop
  • Defining complete testing
  • If prescription 1 is followed, then 2 and 3 are automatically followed but it is impractical for most routines
  • It Can be doe for the routines that have no loops, in which it is equivalent to 2 and 3 prescriptions
Example:
  • The correct version is shown in the image
  • A negative value produces the correct answer. Every statement can be executed but if the test cases do not force each branch to be taken, the bug remains hidden
  • The below example uses a test based on executing each branch, but does not force the execution of all statements

  • The hidden loop around label 100 is not revealed by tests based on prescription 3 alone, because no test forces the execution of statement 100 and the following GOTO statement
  • Furthermore, label 100 is not flagged by the compiler as an unreferenced label and the subsequent GOTO doe not refer to an undefined label
  • A static analysis (an analysis based on examining the source code or structure) can not determine whether a piece of code is reachable or not
  • There could be subroutine calls with parameters that are subroutine labels or in the above example there could be a GOTO that targeted label 100, but could never achieve a value that would send the program to that label
  • Only a dynamic analysis( an analysis based on the behavior while running). Which is to say, to all intents and purpose, testing can determine whether code is reachable or not and therefore distinguish between the ideal structure we think we have, and the actual buggy structure
Share on Google Plus

About Data Sciences by Venu

Hi, My name is Venugopala Chary and I'm Currently working as Associate Professor in Reputed Engineerng College, Hyderabad. I have B.Tech and M.tech in regular from JNTU Hyderabad. I have 11 Years of Teaching Experience for both B.Tech and M.Tech Courses.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment