From the course: Agile Software Development: Code Quality
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
What is code coverage? - SonarQube Tutorial
From the course: Agile Software Development: Code Quality
What is code coverage?
- [Instructor] Code coverage measures how much of your code base is executed when your test suite runs. It's typically measured as a percentage. Don't worry about the actual value the program spits out. In fact, it's best if your team pays attention to how the code coverage value changes over time. As your code base grows, your code coverage value will decrease unless you are running tests to cover the code that runs in production. If it stays the same or starts going up, your team is being really consistent with running tests. So what's a good value target? Many teams strive for 100% code coverage. I find this to be unrealistic for most software systems. Instead, I find that teams should be really proud if they are able to attain and sustain about 85% coverage. A detail which makes this discussion difficult is that test means different things to different teams. When some teams say test, they're referring to a unit test, which just executes a small part of the system, often just a…
Contents
-
-
-
-
-
-
(Locked)
What is code coverage?2m 56s
-
(Locked)
Windows setup2m 9s
-
(Locked)
Collecting code coverage with dotCover3m 23s
-
(Locked)
Visualizing code coverage with NDepend5m 35s
-
(Locked)
macOS X setup3m 19s
-
(Locked)
Collecting code coverage with SimpleCov3m 57s
-
(Locked)
Visualizing code coverage with Code Climate5m 21s
-
(Locked)
-
-
-
-