-1

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'tenter image description here know how to solve some questions like this one

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.