There’s a code coverage data collection tool for almost every programming language. SimpleCov is a code coverage collection library for use with Ruby projects. In this video, explore how to install SimpleCov and set up a Ruby project to use it for collection, and also take a quick peek at the output that SimpleCov generates.
- [Instructor] In order to know what our coverage is … we need to use a tool which will collect it for us … while our test suite is running. … Let's dive in and start collecting code coverage data … for a ruby project, using the simple code gem. … I'm assuming that you've already followed … the setup instructions at the end of the previous video … in this chapter. … If not, you'll need to go back … and do that before following along. … Open a terminal and switch the directory … where you cloned the Sinatra project. … In here, we can run bundle exec rake test … to run the entire test suite. … There's a lot of warnings here included in the output … which we can go ahead and ignore. … So we can see here that the test suite ran … without any errors or any failures. … So next, we're going to open up the project in our text editor. … I'm using Atom. … In order to set up SimpleCov, there's two things that we … need to do first. … We need to install the gem and then we need to configure it … to collect data when we run the test suite. …
Author
Released
3/28/2019- Code quality metrics and tools
- Exploring code complexity
- Adjusting complexity thresholds
- Analyzing hotspots and churn
- Visualizing code coverage
- Finding duplication
- Securing dependencies
- Maintaining a consistent coding style
Skill Level Intermediate
Duration
Views
Related Courses
-
Agile Software Development
with Shashi Shekhar1h 53m Beginner -
Agile Software Development: Refactoring
with Richard Kasperowski1h 31m Intermediate
-
Introduction
-
1. Code Quality
-
What is code quality?1m 28s
-
-
2. Complexity
-
What is complexity?2m 39s
-
Adjust thresholds3m 36s
-
-
3. Hotspots and Churn
-
What are hotspots and churn?2m 22s
-
-
4. Code Coverage
-
What is code coverage?2m 56s
-
Windows setup2m 9s
-
macOS X setup3m 19s
-
-
5. Duplication
-
What is duplication?2m 10s
-
-
6. Securing Your Dependencies
-
Why secure dependencies?1m 51s
-
Setting up Snyk1m 24s
-
-
7. Consistent Coding Style
-
Why consistent coding style?1m 40s
-
Setting up Flask2m 1s
-
-
Conclusion
-
Next steps36s
-
- 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.
CancelTake 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.
Share this video
Embed this video
Video: Collecting code coverage with SimpleCov