Suppose i want to trace an algorithm (think of it as a flowchart) to understand how it works, i need an input(s) for this algorithm, the question is: how can i determine the right input(s) that goes through all the cases ? Is there any "scientific" method to determine this input?
Asked
Active
Viewed 181 times
2 Answers
1
To achieve 100% coverage of all the cases, you'll probably need many test cases.
You might want to do some reading on "test case generation". Typically, software developers think through the possibilities and manually write test cases that they think will exercise each code path. However, another option is to use automated tools, like symbolic execution or concolic execution. You can do some searching on those terms and you'll find lots of material on how they work.
D.W.
- 167,959
- 22
- 232
- 500