Is there an expression in programming that something will 'exercise bugs'?

I have seen this written before but I don't know what it means.

  • 1
    [citation needed] -- I don't think this is a thing. You don't exercise bugs; you fail an assertion. – Robert Harvey Mar 28 '16 at 0:40
  • 5
    Exercise or exorcise? – HorusKol Mar 28 '16 at 2:03
  • 1
    Bugs aren't exercised, they're reproduced. Exercising is something that you do to every branch of your program's control flow, to achieve coverage. – Kilian Foth Mar 28 '16 at 16:32

Exercising bugs would be a pointless activity. What you would do instead is exercise the program to uncover bugs.

You can do this a number of different ways:

  1. Throw a lot of realistic data at the code, and see which data permutations break.
  2. Use a tool like Microsoft Moles to exercise each branch of the code.
  3. Hit the code with a stress tester to see how it behaves under high load.

Integration tests are a form of exercising code. Unit tests tend to operate in a "sterile lab" environment; running the code in its normal working environment can uncover bugs that didn't appear during unit testing.

  • "Exercising bugs would be a pointless activity." - Consider the case where a bug is reported and then you write test cases (at any level - unit, integration, system) for that bug. You may uncover more ways to produce the bug than reported. Couldn't you say that these test cases "exercise the bug"? – Thomas Owens Mar 28 '16 at 11:39
  • 2
    @ThomasOwens: "Exercising the bug" isn't a thing. The only Google Hit for "exercise the bug programming" is this question. – Robert Harvey Mar 28 '16 at 14:30

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.