Code by Refactoring to Get Code Under Test

Most modern teams agree that TDD is the cornerstone technical practice. Writing the tests first ensures your design will be testable. Requiring that those tests be unit microtests ensures that the code is factored into high-cohesion, small, independent units. That makes the code easy to change as your business adapts.

But most codebases did not have the tests written first. And most tests are neither unit tests nor microtests. Most code units were initially well-defined, but the business grew and changed. The units grew with it, and now most code units are highly-dependent on collaborators and have too many responsibilities. Your company needs to get the current code under test so that you can create new code with a TDD approach. But that requires breaking apart the current units, which is hard to do safely or incrementally.

We teach specific technical habits that allow your teams to break apart any code unit and get it under test.

Tier 1: Test Well-formed Code

Learn the Techniques

Fundamentals Workshop
Establish baseline skills to change code without introducing bugs.
6 virtual weeks

Optional: Enable Automation Workshop
Automate even the ugly parts of your build and tests. Test well-formed code even when it is attached to untestable code.
8 virtual weeks

Tier 2: Make Untestable Code Testable

Learn the Techniques

Optional: Persistence Workshop
Isolate your persistence from all other concerns and test them independently.
4 virtual weeks

Optional: Test Database Functionality Workshop
Lift your in-database functionality without breaking it or losing performance, and then unit test it.
6 virtual weeks

Optional: Integration Tests Workshop
Break up your integration tests into microtests that run in <1ms, yet test the integrated product more effectively.
8 virtual weeks

Optional: De-duplication Workshop.
Remove duplication and redundant tests quickly and safely.
4 virtual weeks

Optional: No-mocks Workshop
Test interactions without mocks or integration tests by improving your code’s design.
6 virtual weeks

Optional: Test as Spec Workshop
Structure your microtests so that they perform all the functions of your spec, even in regulated environments. Reduce planning costs and implementation errors.
6 virtual weeks

Optional: Isolate Challenging Dependencies Workshop
Isolate and test databases, service interactions, UIs, clocks, and other challenging collaborators while still creating fast-running microtests.
4 virtual weeks

Optional: God Classes Workshop
Break responsibilities off of God Classes so that you can easily test them in isolation.
8 virtual weeks

Optional: Reduce Coupling Workshop
Decrease the wasted effort that comes from over-testing by decreasing the coupling in your code.
4 virtual weeks

Optional: Test Unknown Code Workshop
Use your testing process to learn code that you don’t understand, while pinning its current behavior in place.
2 virtual weeks


Need a Strategy?

Proof of Concept:
Identify 3 teams for Deep Roots to virtually and simultaneously coach in their codebase. We will work with your leadership to define success measures, then track team outcomes to ensure you get the results you expect.

Direct Coaching:
Identify up to 10 teams for Deep Roots to virtually and simultaneously coach in their codebase.

Train the Trainer:
Identify up to 10 individual technical contributors in your organization to be trained and supported by Deep Roots so that they become your Center of Excellence.