u/burhanrashid52in r/FlutterDev • Recommends
Would you be interested in an in-depth course about writing tests for legacy code in Flutter?
Legacy code is code without a test. In the existing project, we mostly spent 70-80% of the time maintaining code. And test acts as a safety net for our code. But how do we work with a code which does not have any tests?
Writing test for legacy code is tricky.
However, once we understand the basic principles, we can write tests with legacy code using techniques like Extracting interface, Extract and overriding the method, breaking dependencies with dependency injection. And also use these techniques to write effective units, widgets, golden(screenshot), and end-to-end tests in Flutter.
Ther…