Shift more tests left to accelerate development
Diffblue Cover Replay uses existing functional tests and live runtime behavior to automatically create new unit tests for data-driven code and applications, and applications with complex internal states.
Some code is difficult to unit test effectively because the way it behaves at runtime depends on variables which can’t easily be inferred from the code itself. Using functional (or end-to-end) tests instead is a common approach, but compared to unit tests they’re unwieldy, slow, and identify issues too late in the development process.
Cover Replay helps to solve this problem. It instruments your application to capture the information needed to write effective unit tests that validate real-world application behavior. No matter how complex your code is, if you can record an execution that covers a method, you can extract a test for that method. Testing automatically becomes faster and more effective without any changes to your code.
Cover Replay provides the information needed for Cover Core to automatically write new unit tests that improve overall software qualty and help you meet coverage gates.
Shifting more testing left means you can find and fix regressions sooner, and more easily. Some behavior captured by Cover Replay may never have been tested before - even later in the process.
The closer you get to production, the harder and slower effective testing becomes. That’s the point of shift left and power of unit testing. Cover Replay accelerates software delivery by reducing the time spent on QA.
Cover Replay gives you the means to identify and unit test a range of runtime scenarios that might not otherwise be thought of, reducing the risk of change even further.
Like most features of Diffblue Cover, Cover Replay can be used locally by a developer (e.g. on their laptop) or integrated into a CI pipeline for more predictable, repeatable, low-effort unit testing.
Cover Replay instruments your application and captures actual runtime code behavior - typically via functional, integration or end-to-end tests - which provides Cover Core with the information needed to automatically write more unit tests.
The Netflix-Graph project uses graphs to represent a database. The method getConnection requires a NFBuildGraph object, which in turn depends on the NFGraphSpec object, which represents a database schema. A complete unit test for this complex chain of objects cannot be created by code analysis alone. Without Cover Replay, Diffblue Cover was able to write this test:
Using Replay, a much more comprehensive unit test can be written automatically because Diffblue Core can now see all the objects required to write the test:
Diffblue Cover creates suites of unit tests that run in your continuous integration pipeline between versions and protect against regressions, so you can catch errors faster and earlier in the software development lifecycle. To learn more, see our our product page.
Diffblue Cover helps your team increase automation of your CI pipeline.
For development teams, this:
For DevOps teams, this:
Yes. Diffblue Cover quickly generates tests that will allow you to adopt CI. The generated tests will help developers quickly identify regressions in subsequent commits before committing new versions.
See the product datasheet for more information.
Diffblue regression suites are maintained automatically and updated with each new code version to capture the current behavior of the code.
Diffblue Cover AI analyzes your code and writes Java unit tests that run in a CI pipeline after each commit. Cover’s tests:
No. Diffblue Cover is meant to complement your own unit tests and help you catch regressions.
Developers write individual unit tests to test specific functionality. Diffblue regression suites are generated automatically to help find regressions early in the development cycle. Find out more in our Unit Regression Tests eBook.