Table of Contents – Why Code Coverage?
Welcome to Part IV: Code Coverage. I read this chapter in the most recent version of The Pester Book, which was released on Saturday, April 28, 2018. Be sure to get the newest version if you’re following along. I hope you have been, as according to the ePub file on my iPad, Part IV began with only 51 pages left in the entire book. We’re nearing the end.
Code Coverage is the ability to determine the amount of code that executes as a part of your testing. There are a few metrics, or measurements, that we use along with code coverage. These are statement coverage, branch coverage, path coverage, and condition coverage. Each of these allow us to measure the coverage of code, even as they may sometimes overlap. Be sure to make these, make sense to you.
It was nearing the end of this shorter than normal chapter when it spelled it out like so: “Simply put, code coverage is a way of measuring whether or not you’re executing all of your code through a given set of tests.” In closing here, I do want to bring up test cases. As they were mentioned as a part of this chapter, you may want to head back and review theses if you don’t remember them well. I remember them, but that’s because I’ve put them to use in some of my own testing.
I’m already looking forward to the next chapter, where I’ve spotted some example code. It’ll be helpful to see some examples after this introduction.