The purpose of branch coverage is to check whether every conditional branch in a given line of code has been tested and Ruby has this feature since 2.5. Ruby’s simplecov can report branch coverage too and now so does undercover with the new 0.4 release!

This addition allows you to detect even more untested code within each automated pull request review, including untested case statements, conditional method calls (e.g. foo&.jump), single-line ifs (return :foo if valid?) or ternaries (foo ? 1 : 2).

Head over to the readme if you’re getting started, otherwise here’s what to do to add branch…


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?

Adding UndercoverCI to your code review workflow will prevent untested code changes from slipping into production without anyone noticing.

A sample pull request comment from UndercoverCI: the new method is missing a test

UndercoverCI is a GitHub App for Ruby that finds untested code changes in your commits and pull requests by reading each diff and comparing against a test coverage report. The result: actionable comments on untested methods, classes and blocks, whereas other coverage tools would only give you percentage data.

Why is that better than $my_current_coverage_tool?


This is part 2 of Stop Shipping Untested Ruby Code with Undercover. If you’re wondering What The Heck™️ all of this is about, you may want to read the first post in a new tab.

Ruby’s SimpleCov lets us track test coverage and is common when developing Ruby on Rails apps. Many code review services that rely on SimpleCov allow us to see the coverage delta or diff coverage as a percentage. …


Ruby is a productive and fun to work with environment with lots of useful tools and products for managing software quality. Today, I am excited to share one of my recent ideas in that space: Undercover, a gem that stops us developers from shipping untested code in CI and in dev: https://github.com/grodowski/undercover.

Undercover inspects changed files and creates warnings for blocks of code which have not been tested, similar to a linter. It’s a simple idea I found useful in a large codebase along with existing coverage reporting tools and I hope you’ll see the value as well!

Testing large apps

Dealing with…


TL;DR codebeat officially supports JavaScript and TypeScript analysis for both premium and free users! 🎉

Providing a complete, automated code review toolkit that the web and mobile developers could trust and love, is our primary goal at codebeat.

We’ve already been on the road towards supporting a handful of languages for quite some time; including unique supports for Swift or Kotlin. One of our latest updates and the main topic of this blog post is the frequently requested JavaScript support, which would turn codebeat into a true full-stack analyzer. …

Jan Grodowski

software engineer @rainforestqa, hardware hacker and fixed-gear cycling enthusiast from Warsaw, PL.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store