Skip to content

Write testable code

Write all code in a way that allows you to test it in an automatic fashion.

If this requires refactoring your code, do it. Do that first, before you start adding other features.

If you add to legacy code that is too badly structured to be tested, refactor it at least to the extent that you can test your additions.

From SAP/styleguides under CC BY 3.0 — more details
Last updated on