One of a tester's tasks is to isolate a bug. Narrowing a problem search space will help a developer to find the cause and fix it.
By isolating the bug I mean both finding the class of inputs that generate the error output of the app and finding which component, configuration file or piece of code contains the cause of an error.
Some methods I heard about and sometimes I combine together (less or more intuitively) are:
- Scientific method. I hypothesize about possible cause and run repeatable experiment to verify it. I sample inputs, and compare actual program output with expected one. Even if I don't find the cause I may find the smallest input for which the bug is reproducible.
- Debugging. I inspect the state of the running program (stack, variables) using debugger tool or by adding additional logging instructions (e.g.,
printf
). Particularly good, when by restarting the app I could lose the state in which the bug occurred or app is on not mine, remote machine. - Reading and understanding the code base, logs, stacktraces and configuration files. I want to understand why this code base produced this output.
- Binary search of the problem space. Described well in How to Make your Bugs Lonely: Tips on Bug Isolation, can support scientic method in a systematic way.
- Root cause analysis. I try to narrow down the problem to one of the possible root cause classes defined by Software Testing Primer. I make sure errors are not in my test cases, nor in environment configuration. Then I check the code itself.
In the last case I also sometimes try to understand if the problem is caused by another bug, or by ambiguous/incomplete requirements/design.
What's your approach? Can you recommend me some reading, videos, excersises? And what are the right keywords here to google for?