What is Diffblue Cover?

Diffblue Cover is a reinforcement learning AI platform that automatically writes comprehensive, human-like Java unit tests for Java and Kotlin projects - saving developer time, increasing test coverage, and reducing regression risks. Cover is provided as an IntelliJ IDE plugin (Cover Plugin), a CLI application (Cover CLI), and a CI integration to provide fully autonomous operation (Cover Pipeline). Three additional components (Cover Reports, Cover Optimize, and Cover Refactor), for test management and analytics, complete the Diffblue Cover platform.

But what does that mean in practical terms? As an example, let's take a method for uploading a file to an Amazon S3 bucket. The method is relatively simple, just a few lines of code, but the required test is more complex and would take a developer approximately 30 minutes to write if they've never done it before. Diffblue Cover did this in 1.6 seconds - that's not a typo - 1.6 seconds, computationally perfect, human readable, every pathway tested.

    public PutObjectResult uploadFileToBucket(String bucketName, String key, File file) {
        try {
            return s3client.putObject(bucketName, key, file);
        } catch (AmazonS3Exception e) {
            throw new IllegalStateException("Totally handled this exception", e);
        }
    }

Taking another real-world example from an existing customer we can illustrate how this is scaled up for an organization. Diffblue Cover was able to write 3,000 unit tests across an expansive code base for a single mission-critical application, right out of the box. A conservative estimate is that this would have taken a senior developer an estimated 268 developer days to write. Diffblue Cover achieved this in 8 hours, doubling test coverage, even before any refactoring.

Some basics

If you missed our short intro video on the website, take a look here - this captures the essentials of Diffblue Cover:

Key features

Diffblue Cover is the generative AI engine at the center of our platform. Cover automatically writes human-like Java unit tests that are easy for a developer to read and understand. AI-written unit tests are ready to use - they compile, run, and accurately validate the current behavior of your code.

Cover is fully autonomous. It can create an entire unit test suite for your whole application in a single execution, run locally within your environment, no cloud service required, no developer overhead. Cover also maintains this unit test suite as your software evolves, even on applications with millions of lines of code. Thanks to a deep understanding of how your code works, Diffblue Cover knows what tests need to be added and updated for every code change. It implements the necessary updates automatically, ensuring coverage doesn’t dip while your teams move faster.

IDE, CLI, CI Pipeline

Diffblue Cover is one AI, provided in three interaction models - an IDE plugin (Cover Plugin) and a CLI tool (Cover CLI) for developer use, and a CI Pipeline integration (Cover Pipeline) for DevOps teams. Use Cover Plugin, CLI, and Pipeline in isolation or in partnership as needed, depending on your preferred workflow.

  • Cover Plugin for IntelliJ writes tests for your methods and classes directly within the IDE on the developer desktop.

  • One click test creation, fully integrated UI.

Report, Optimize, Refactor

Three additional features are provided to allow you to monitor your test coverage (Cover Reports), optimize test runs (Cover Optimize), and automatically refactor your code to improve testability (Cover Refactor).

  • Visualization tool for test coverage statistics, coverage risk, testability, and more.

  • Get valuable insights about your Java codebase - pinpoint unique, actionable insights that improve quality and efficiency.

  • Have a more holistic view of unit testing. Coverage data is combined with information on variables like code quality, testability. and complexity.

  • Understand risk. Reports show you exactly what code isn’t tested, how important it is, and why tests might not have been written.

  • Benchmark and track the effectiveness of your Java unit testing over time.

  • Track how Diffblue Cover is being used across your organization.

Key benefits - in summary

It's difficult to summarize all the benefits of Diffblue Cover, but here's our top ten:

  • Automated Java unit tests. This one's a given. Automatic, unbiased unit tests that exercise the actual behavior of your code, including obscure corner cases and scenarios developers may not know how to test.

  • Eliminate developer overhead. Avoid researching tests, writing tests, maintaining tests, learning unfamiliar code source, context switching, waiting time, and more. Target your developer skills at improving your applications instead.

  • Catch regressions early and at the most granular level. Avoid rework time, optimize workflows, and avoid outages in the field.

  • Increase coverage. Get to 80% coverage in half the time! Diffblue Cover creates unit tests in bulk to help your team quickly assess the quality of your test suite.

  • Untangle legacy code. Our tests document your code, making scary code changes easy. This helps you to quickly write tests for large legacy codebases, and identifies untestable code that should be refactored.

  • Reduce development costs and increase productivity. With reduced or eliminated developer time, optimized test runs, CI/CD integration, and more, Diffblue Cover works 24/7.

  • Document your code. Diffblue Cover unit tests describe every behavior of every method - effectively documenting your code to make future code changes quicker and reduce regressions.

  • Monitor coverage and understand risk. Cover shows you exactly what code isn’t tested, how important it is, and why tests might not have been written. Target developer expertise more efficiently, either at areas of most risk or those where additional coverage can most easily be delivered.

  • Accelerate modernization and cloud migration. Diffblue Cover can support the migration from applications to microservices by providing a documented code base and improved test coverage.

  • Keep code private. Diffblue Cover’s generative AI operates entirely within your environment. No data ever leaves your organization.

How it works

  • Diffblue Cover first ensures that your code is compiled and examines each method that Cover will create tests for, and any related methods.

  • Cover then creates initial test candidates for each method, which are then evaluated and adjusted to maximize test coverage. This process is repeated until the set of tests that optimize coverage are selected and committed to your code base. The tests are computationally correct and human readable, every time.

  • Diffblue Cover is intended to be used for unit regression testing. That means it creates tests that reflect the current behavior of your code. Later, when you make changes to the code, these tests may fail and therefore highlight regressions. Since tests are written for your entire application at the most granular level, this means the smallest of regressions are caught which can avoid the dangers of incubated regressions that can manifest and build over time.

Last updated