Canonical: https://instain.ru/en/ai/diffblue-cover/
Language: en

Diffblue  test generator

# Diffblue Cover. 

Unit test generation for Java and Kotlin projects

4.33 / 5    [Directory score](https://instain.ru/en/ai/diffblue-cover/#editorial-rating) [Official website ](https://www.diffblue.com/)

Diffblue Cover generates unit tests using reinforcement learning. It offers an IntelliJ extension, a command-line tool, and CI integration.

![Diffblue Cover documentation about creating tests for Java.](https://instain.ru/assets/images/diffblue-cover-screen-d05ccfb6c065-1200.webp)

Diffblue Cover documentation about creating tests for Java.  [Open the source ](https://cover-docs.diffblue.com/get-started/what-is-diffblue-cover)

## Record behavior before refactoring

Diffblue Cover creates unit tests for an existing project. Before moving code, generate tests for a small class and see which branches they cover. This is useful for code that has been stable for a long time and has little documentation of its actual behavior. The tests help establish a baseline.

A test that repeats the result of the current code requires reading. If the application returns an incorrect response for a rare login, the automatically created check can pin that response. Verify statements with a known contract and correct the test where the contract is at variance with implementation.

## Training example with delivery rate

Let the service calculate the cost of delivery by weight, and free delivery is valid for a given order amount. Choose a calculation method and prepare several boundary values. After generation, look for tests for the amount at the border, weight zero and negative weight. Check the expected values manually. If you need an exception case, see what the test distinguishes it from a random data preparation error.

Run the set after a small controlled threshold change. If no test has noticed such an edit, one coverage indicator is not enough for acceptance.

## How to include Cover in the project

Cover is available in several forms. Use the extension or CLI for a focused check and consult the CI documentation for recurring work. Start with a part of the project that your team can build and test without external production data.

## Suitable tasks

- Prepare unit tests before refactoring Java code

- Check the processing of exceptions in the service

Features 

## Strengths

- There is an IntelliJ extension and a command line startup

- Generation is focused on the existing project code

Things to consider 

## Limitations

- Need to check the compatibility of the project and assembly

- Generated tests can reinforce pre-existing faulty behavior

## Selection and conditions

Free access

Not confirmed

Trial period

Not confirmed

No sign-up required

Not confirmed

Russian interface

Not confirmed

Local installation

Not confirmed

API

Not confirmed

“Not confirmed” means there is not enough information. The feature may still be available; check the developer’s terms.

Input formats

Code, Text

Result

Code, Text

### Terms

The subscription and trial access conditions depend on the product and how it is launched. Check the current Diffblue conditions. Generated tests can reinforce pre-existing faulty behavior

From task to first result

## Practical example

Task

Prepare unit tests before refactoring Java code

What to prepare

The collected training project and rules for calculating delivery with limit values of weight and amount.

### Task brief or prompt

Tutorial: Open the calculation method in IntelliJ and run Write Tests. Check the received checks with the rule of free delivery and the condition of unacceptable weight.

### Expected result

Unit tests with clear conditions and expected values.

### How to check the result

- Compare the approvals with the contract method.

- Change the threshold in the working copy and make sure that the desired test responds.

An editorial teaching example of a task brief, not the result of hands-on testing of the service. Check that the required mode is available, that you have rights to the source material and that the intended use of the result is permitted.

Check details

## Official sources

-  [Diffblue Cover Page ](https://www.diffblue.com/)

-  [How Diffblue Cover Works and What Components Are Available ](https://cover-docs.diffblue.com/get-started/what-is-diffblue-cover)

-  [Integrating Diffblue Cover with GitHub ](https://www.diffblue.com/github/)

-  [The first launch of Diffblue Cover Plugin ](https://cover-docs.diffblue.com/get-started/get-started/get-started-cover-plugin)

This description is based on the developer’s material. Features, prices and availability may change; check the primary source before use.

About the tool

Developer

Diffblue

Category

[Code](https://instain.ru/en/category/code/)

Access

To generate, you need to assemble the project in a suitable environment. Requirements and access to components depend on the Cover option used.

Payment

The subscription and trial access conditions depend on the product and how it is launched. Check the current Diffblue conditions.

API

No separate API specified

[Developer terms ](https://www.diffblue.com/)

Directory score

4.33 / 5 

Features

4.20 / 5 

Workflows

4.40 / 5 

Ecosystem

4.20 / 5 

Documentation

4.50 / 5 

Scores are an editorial guide to the directory. They are not user reviews or the results of personal testing.

[See the methodology ](https://instain.ru/en/methodology/)
