Today, I’m launching UndercoverCI— a CI robot who protects your Ruby codebase from untested code changes. Take a moment to learn why you should add it to your team’s code review workflow.
What?
UndercoverCI is a GitHub App for Ruby that finds untested code changes in your commits and pull requests. UndercoverCI reads each of your diffs and compares them against a test coverage report to provide actionable review comments on untested methods, classes and blocks, whereas other coverage tools would only return a percentage total (and difference) for the entire commit.
Adding UndercoverCI to your code review workflow will prevent untested code changes from slipping into production without anyone noticing.
Why is that better than $my_current_coverage_tool
?
I’ve written about why you should stop shipping untested Ruby code with undercover and how to wire it up with your workflow when I released undercover
— the core gem that actually powers UndercoverCI (470+ stars on GitHub and counting!).
Here’s a TLDR. You should consider UndercoverCI if:
- You think that aiming for full test coverage might not be the best investment for your team, but want to ensure all pull requests are well-tested.
- You’d like to encourage your team to write more robust tests and increase test coverage where it matters and at the right time.
- You’d rather automate such code review comments (my coworkers’ real replies to undercover):
Actually the tests weren’t even calling the code I’ve changed.
, or:
Looks like this branch was never tested…
To recap the above points, existing coverage tools for Ruby provide percentage data and diffs, yet they guarantee that all committed lines are covered only if you hit 100% or review the test coverage report manually before each merge. You can automate that effort with UndercoverCI and get PR checks that look like if someone has searched for missing tests in the SimpleCov report. This makes it useful for projects scoring below 100% coverage or ones that won’t give you the confidence of a comprehensive test-suite at all. It’s a focused and local approach, which ensures that you invest in test coverage where it matters most.
🕵️♀️ Ok, sign me up!
If you’re convinced, sign up on the UndercoverCI website or go straight to UndercoverCI on GitHub to install the app!
How much does it cost? Yes it’s going to be a paid product with a monthly subscription starting at about $29 (exact pricing TBD). Good news is that you can still get it for free if you sign up before 2020–07–31!
This text was originally posted on Medium
Top comments (0)