Are your unit tests hiding critical design flaws? Learn a two-pronged strategy to confidently refactor even the most tangled codebase.
#1about 2 minutes
Defining the 'ball of mud' software problem
A 'ball of mud' codebase is too complex to understand and its changes have unpredictable results, requiring a different approach like testing to solve.
#2about 7 minutes
Using system tests to verify infrastructure stability
Simple system tests running frequently in CI can confirm infrastructure is operational, which is a critical first step before tackling code correctness.
#3about 4 minutes
Rebuilding testing skills with incremental unit tests
Start by adding two unit tests per work item to gradually build the team's testing skills and integrate testing into the development process.
#4about 3 minutes
Redefining the 'unit' in a complex codebase
The 'unit' in a unit test for a ball of mud is the smallest testable group of code, which reveals the actual system design, not an idealized one.
#5about 3 minutes
Weighing the risks and benefits of mocking
Mocking can ease the pain of dependencies but risks creating a shadow implementation; isolating dependencies by design is a more robust alternative.
#6about 3 minutes
Dealing with legacy tests and test dependencies
Old, failing tests should be deleted, and new tests must be independent to avoid creating a debugging nightmare where test order affects outcomes.
#7about 4 minutes
Strategies for ensuring test independence and speed
Enforce test independence by running tests in a random order and optimize speed by decoupling code from frameworks, not just through parallelization.
#8about 3 minutes
Adding smoke tests for critical application use cases
Once infrastructure and unit tests are in place, add smoke tests for critical use cases to verify high-level application correctness.
#9about 11 minutes
Conclusion and Q&A on advanced testing topics
The talk concludes by summarizing the need for a different approach to legacy code, followed by a Q&A on singletons, snapshot testing, and parameterized tests.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
02:02 MIN
Practical strategies for testing legacy applications
Testing .NET applications a Tool box for every developer
02:52 MIN
The vicious cycle of untestable legacy code
How Unit Testing Saved My Career
01:50 MIN
Shifting focus from fixing the test to fixing the app
Fighting test flakiness with time machines
06:29 MIN
Why standard TDD fails in complex legacy code
How to TDD in legacy code
06:32 MIN
Enforcing architectural patterns with automated tests
One-click-to-production: Test and automate your application
04:45 MIN
Why traditional testing methods fail for microservice architectures
Lessons from Our API Past: Evolving to a Resilient API Future
09:16 MIN
Identifying the common pains of software testing
Write tests you love, not hate
03:37 MIN
Preventing architectural decay and code structure issues
Dev Digest 113 - Debugging above the cloudHello there and welcome to Dev Digest 113! This time, we got an old friend in the sky back, jQuery asks us to upgrade and AI is eating the web. Also, are you sure the LLM you use is secure against code injection?News and ArticlesGood news everyone! N...
Daniel Cranney
The real reason we document our codeThe world of software development moves fast. Technology is constantly changing, as are the tools we use with it, and even the role of a programmer is itself constantly in flux. However, some aspects of software engineering are so foundational that w...
Kate Passby
How to create a test plan for software testingWhen creating new software, it's important to put it through rigorous testing. This improves IT security and helps to identify any problems. As software developers, the aim is to make the process of testing as painless as possible. This ensures the s...
From learning to earning
Jobs that call for the skills explored in this talk.