O'Reilly logo

Testing with F# by Mikael Lundin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tests that never break

Another common smell is tests that never break, no matter how much you break the feature. This is quite common to see in unit tests where tests are written after the system under test. The test itself is there to cover some part of the code to bring the coverage up, but it is disconnected from the feature that it is actually covering.

What is common for all these tests is that there is a bug in the test that makes it pass even when the result is wrong. Writing bugs in tests is quite common and should never be underestimated. Another common reason is that the test has been badly named and is not actually asserting the thing it is named after. This will result in green, passing tests when the thing the test was supposed to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required