In this video, discover how to use the Approval Tests to quickly build out unit test coverage.
- [Instructor] Test coverage is a measure … of how much of your production code is executed … when your test is run. … There is a healthy debate about how much test coverage … is enough. … But in general, more is better than less or none. … While 100% is going to be impossible to reach … for many projects. … When you go to clean up a chunk of code, … it's very important to have high code coverage … for that chunk of code. … Even if coverage is low across the rest of the code base. … The trouble is, not all code is easy to test, … especially using traditional unit testing techniques. … That's where employing a different testing technique … can be a big help. … One solution that works really well, … is the Approval Tests testing library. … Approval Tests allow you to capture an artifact … of the code's current behavior … and then compare that artifact … against one that you captured earlier … and declared was correct. … This is sometimes referred to … as the golden master technique. … Let's walk through an example …
AuthorM. Scott Ford
- Assessing the technical debt
- Creating and running a test suite
- Handling failing tests
- Updating dependencies and tools
- Paying down technical debt
- Remaining test driven
- Monitoring code quality
Skill Level Intermediate
Agile Software Development: Code Qualitywith M. Scott Ford1h 40m Intermediate
Agile Software Development: Refactoringwith Richard Kasperowski1h 31m Intermediate
1. Getting Started: Review the Technical Debt
2. Fence in the Technical Debt
3. Improve Your Tools
4. Pay Down Technical Debt
5. Keep Technical Debt at Bay
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.