Document Possible Bugs with Tests – Codecast Blog post series This blog post is part of a series about legacy coderetreat and legacy code techniques you can apply during your work. Please click to see…
Unit Testing on Legacy Code – Codecast Blog post series This blog post is part of a series about legacy coderetreat and legacy code techniques you can apply during your work. Please click to see…
This blog post is part of a series about legacy coderetreat and legacy code techniques you can apply during your work. Please click to see more sessions about legacy code.
Purpose
When writing unit tests on legacy code, we often discover behaviours of the system that seem wrong. The main rule is: DO NOT change the production code without being absolutely sure that the change does not introduce defects. Instead we need to mark all the tests that characterize a possible defective behaviour. Let’s look at some ways to document possible defects with tests.
This blog post is part of a series about legacy coderetreat and legacy code techniques you can apply during your work. Please click to see more sessions about legacy code.
Purpose
By using mocking frameworks we are writing short and easy to read tests. The duplication of test doubles written by hand is minimized by the use mocking framework.
This blog post is part of a series about legacy coderetreat and legacy code techniques you can apply during your work. Please click to see more sessions about legacy code.
Purpose
Almost always when needing to test existing code we bump against dependencies that make the system untestable. This technique is useful to extract the static dependencies. After that we can use dependency inversion in order to be able to really test the systems.
With this technique we can transform untestable systems into testable systems, step by step. The steps are small because we want to enable safety while changing the code.