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

Always refactor your SUT

In the testing pattern red, green, refactor the last part is often forgotten. Once the test goes green, it is easy for the developer to forget about the refactoring part, or just move on because of a pressing deadline.

The refactoring part is the most important part of testing as this is what makes our code high-quality. Some of our system code is very hard to test and will not be enabled for test automation until we have refactored it. It is therefore crucial to refactor after each test so that we don't build technical debt.

One of the greater points of unit testing is to enable refactoring. By having coverage over your features, you will ensure that nothing gets broken after the refactoring is complete. Refactoring is ...

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