The Best Ways to Use Diffblue Cover for Big Codebases

Hello Everyone :hugs:,

Diffblue Cover is a fantastic tool that I recently started using to automatically generate unit tests in Java. But I’m working with a really big and complicated codebase right now, and I’m having some difficulties that I’m hoping the community can help me with.

Problems with Performance: Although Diffblue Cover performs admirably on smaller projects, I’ve observed certain performance lags when using it on bigger code bases. When creating tests for a larger project, are there any best practices or configurations that can help maximise performance? Is it better to work on smaller modules first, or is it possible to manage the full codebase at once with efficiency? :thinking:

Managing Old Code: There isn’t much documentation and a large portion of the codebase I work with is legacy code. Has anyone successfully generated tests for ancient systems automatically using Diffblue? If so, do you have any advice on how to increase precision or handle edge instances that the tool might have trouble with? :thinking:

Integration with Continuous Integration/Continuous Delivery (CI/CD): Including Diffblue Cover in our CI/CD workflow is something else I’m interested in doing. To what extent does it work with popular CI/CD tools such as Travis, GitLab CI, and Jenkins? To guarantee a seamless integration, are there any specific actions or setups I should be aware of? :thinking:

I would be grateful for any guidance, suggestions, or firsthand accounts. Anticipating gaining knowledge from the experiences and ccsp perspectives of the community!

Thank you in advance for your help and support.

Hi Peter12,

I’m going to give some quick responses, but not go into great detail.

Performance This may depend on your project, system, Cover usage (plugin or CLI), and other factors. If you could give some more information here that may be helpful. That said, For large/complex projects usually using the CLI is best.

Legacy Projects Yes, Diffblue Cover has been used on legacy codebases many times. Generally precision and edge cases can be handled with a little care of how they occur. Options such as using custom rules can be very helpful here (documentation here).

Integration with CI/CD Diffblue easily integrates with CI/CD, details on how to do so for GitHub/GitLab/Jenkins/etc. can be found under the Cover Pipeline documentation.