1

What should I do with tests which flap once every 30 runs or so? This behavior is due to some webdriver or browser issue and cannot be fixed.

Should I delete the test; so that it does not continue to raise false alerts. But in this way, i will also lose the protection against regressions.

What would you do?

0

1 Answer 1

4

I assume by "flap" you mean the test is failing unreliably. Unreliable tests generate a lot of noise in the system, and are also costly.

First, I look at the value of this test? Is this test really providing me with valued information every time it runs?

Other considerations include:

  • Is there another way to validate the functionality/behavior at a lower level or with mocks?
  • Automated tests are generally not that smart. Tests should result in a Pass, a Fail, or an Indeterminate condition. If the machine or system is not in the expected state for the test to run properly (e.g. webdriver or browser issue) then your test should log the 'invalid' state and log an indeterminate or skipped result.
1
  • I like your 2nd suggestion: to return a skipped result when the underlying framework behaves incorrectly.
    – Asad Iqbal
    Commented Feb 15, 2014 at 1:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.