Tell me again: why do I need another tool?

Diffblue HQ
3 min readDec 2, 2019

--

Development environments today contain so many different tools that it’s mind-boggling how people even choose which ones to use. I’m sure that you already have your SCM, CI system, test framework, code coverage tool, code quality checker, etc. So do you really need another tool?

For nearly every problem that can occur during development, there is a tool out there that claims to solve the problem for you. Think about security and I am sure that FindSecBugs, Fortify and Coverity all come to mind. Think about CI and Travis, GitLab and Jenkins come to mind. For Code Coverage, it’s Jacoco, Cobertura and SonarQube.

There is one thing that all of these tools have in common. They are very good at telling you that your work is bad. When I think of vulnerability scanners, I think about the report I get:

Image from Microfocus

It will say that I have either passed or failed my company standards, e.g. no new critical vulnerabilities may be introduced.

Here, I am looking at yet another report on your PR. I’ve missed the code coverage target. Here is the typical code coverage report, showing red for missing coverage:

Great, thanks for telling me that my code is inadequate and leaving me to figure out how to solve the issue. I can expect to spend the next half a day trying to add test cases to cover some of the corner cases in my code.

There must be a better way.

In steps Diffblue Cover. Of course, while analyzing your code and your test suite, Diffblue Cover will report your current coverage metric. However, unlike other tools, it doesn’t stop there. Diffblue Cover will go on to generate example test cases that cover other paths through your code. This means that with a quick review of the generated tests, you can make any updates that are required to get a complete and comprehensive test suite for your PR.

Unlike the previous screenshot, which shows red for missing coverage, here we show blue, which means that a test has been generated.

Essentially, Diffblue Cover has been designed to help you fix your problems, rather than just pointing them out. This means that in a world where the spotlight is on your PRs, there is a tool that will actually help you work faster and more efficiently.

Originally published at https://www.diffblue.com on December 2, 2019.

--

--

Diffblue HQ
Diffblue HQ

Written by Diffblue HQ

Diffblue Cover autonomous AI-powered Java unit test suite generation & maintenance at scale. | We’re making developers wildly more productive with AI for Code

No responses yet