From the course: Azure for DevOps: Continuous Integration

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Code coverage

Code coverage - Azure Tutorial

From the course: Azure for DevOps: Continuous Integration

Start my 1-month free trial

Code coverage

- [Instructor] Writing tests for our code is essential. But how do we know that enough tests have been written? Well, code coverage tools allow us to see how many tests have actually been written and how many lines of our code are actually backed up by tests. If you have access to the exercise files, then check out the project for this video called Code Coverage. In here, you'll see a very simple web API project and a test project. This test project doesn't do a whole lot but if you open up the actual test results folder under Controllers you'll see ValuesControllerTest. And this has a very simple test that just checks to make sure that if a values controller does not receive an order service that it throws an argument null exception. A pretty simple test and a pretty good one at that. Now, what we want are to add some test. Now, you see here I've actually installed some local testing tools to give us coverage information. But I…

Contents