calculating minimum test cases for 0-Switch coverage



  • I'm new to testing and I don't understand 0-switch coverage and 1-switch coverage very well, I understand the concept but I don't know how to solve some questions like this one

    enter image description here



  • 0-switch coverage is basically the testing for each valid transition. Since you don't have loops, you simply count the number of arrows.

    1-switch coverage relates to the number of pairs of valid transitions. E.g., "3 -> 2 -> 1" is a pair of valid transitions. On the other hand, "3 -> 2 -> 4" and "3 -> 1 -> (whatever)" are not valid because you can't perform these paths.

    N-switch coverage refers to N+1 valid transitions list.

    You can find an algorithm to find all paths between two nodes here: https://stackoverflow.com/a/58446/2252076

    Which you can adapt to discover all paths of length N.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2