A Testing Puzzle...

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.

Guru Rao

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 %.

Sandip Saha

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!

回复

要查看或添加评论,请登录

Abhimanyu Gupta, Ph.D.的更多文章

  • Side Hustle

    Side Hustle

    In high school, Jake insisted on being my “life coach.” He’d tell me when to study, who to date, and how many almonds…

    1 条评论
  • Emotional Algebra

    Emotional Algebra

    Last week, Rachel cried in the middle of a Zoom call. Not because the meeting was sad, but because someone asked, “Can…

  • Stuff Schtuff

    Stuff Schtuff

    Sneha had three Gucci bags, a MacBook, and a skincare fridge. I had unmatched socks, a cracked phone, and a…

    1 条评论
  • Habit Habitat

    Habit Habitat

    Rohan wanted to read daily. So, he bought a Kindle, set reminders, made a reading list, and still ended up…

  • Debt Drama

    Debt Drama

    Picture this: You're on a treadmill, running full speed, while society hands you a shiny new credit card, saying, “You…

    1 条评论
  • Boundary Thieves

    Boundary Thieves

    When Alex started saying no, people got mad. Not everyone, just the ones who always benefited from Alex saying yes: the…

  • Truth Hurts

    Truth Hurts

    Lying is exhausting. It’s like juggling five flaming swords while riding a unicycle on a tightrope.

    1 条评论
  • Fear of Failure

    Fear of Failure

    Nobody really fears failure. Tripping over a curb, burning toast, or breaking a cup doesn’t send anyone into…

    1 条评论
  • About Parenting

    About Parenting

    A man once asked a gardener, "How do your plants grow so beautifully?" The gardener replied, "I don’t force my plants…

    3 条评论
  • Chaotic Genius

    Chaotic Genius

    Emma aced physics by building potato batteries instead of reading the textbook. Sam learned economics by reselling…

    2 条评论

社区洞察

其他会员也浏览了