A Testing Puzzle...
Suppose you are playing this game with an application you are testing.
You have three test cases and you know that there is exactly one bug in the application.
Your job is to catch the bug. However, you can execute only one test case (out of the three).
The rule is, you are required to pick a test case first that you want to execute. Once you pick your test case, the application points to one of your remaining two test cases that would pass with certainty (i.e., the test case that will not be able to catch the bug).
So, that leaves you with only two test cases - one you have already selected and one you haven't.
In this situation, you are given an option to 'stick' to your original selection or 'shift' to the other test case.
Which option (between 'stick' and 'shift') you would go for to maximize your probability of finding the bug?
Also, can we write an algorithm that will solve a similar problem with n test cases and m (< n) defects?
We, at Testing Algorithms, invent and implement similar algorithms to solve real life testing problems.
Risk Management at Nationale-Nederlanden
8 年Would have to shift.
you have to shift, as that will increase the probability of finding the bug from 33.3% to 66,7 %.
Senior QA Engineer
8 年Interesting. Will try to find the soluation.
Really interesting puzzle. I believe for either of the actions, the probability to find bug is same. Excited to know the answer!