Learn the basics of what is code coverage and why it matters. See how easy it is to generate and view the code coverage for an application. Learn how to improve the code coverage for an application.
- [Narrator] Code Coverage is a measure…of how much or rather what percentage of lines…in our codebase is covered by our test.…In short, it tells us these lines were run…and for what particular test.…Recall, one of the aspects of unit testing…is our test working in isolation on our code.…This isolation of our test permits us to see…the coverage of our code; simply, as the code we run…based on the particular test for that particular method.…The question you're probably thinking,…"Is there a magic number at which I've solved all of…my prompts with bugs and other issues?…Is there some point, say at 80 or 90 or even a mythical…100% code coverage that I've solved everything…and defeated my code coverage issues…and left no bugs on my software?"…The answer is nope.…
There just isn't a magic percentage of code coverage…that will solve all of your problems,…but code coverage is still the best measure…we have for producing well-tested code.…So, let's look at exactly how to generate code coverage.…We'll go to our editor and we can open up the phpunit.xml…
- Why use unit testing?
- Writing unit tests
- Extending unit tests
- Filtering PHPUnit tests
- Building dummy objects
- Working with data providers
- Writing an exception-based test
- Using TDD tactics
- Using PHPUnit advanced tactics, such as database tests
Skill Level Intermediate
PHP: Managing Persistent Sessionswith David Powers2h 41m Intermediate
1. The Basics of Test-Driven Development
2. Advanced Test-Driven Development
3. Test-Driven Development Tactics
4. PHPUnit Advanced Tactics
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
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.