Spring configuration options

To set your Spring configuration options for Cover Plugin go to Diffblue > Change Settings > Spring in IntelliJ.

Mocking in Spring integration tests

Check the Enable integration tests option to limit mocking for Spring projects to Repository dependencies only - Spring handles the rest directly. If this option is not selected then mocking may be implemented for a wider scope of dependencies.

  • Spring Repositories are classes implementing org.springframework.data.repository.Repository or those annotated with org.springframework.stereotype.Repository.

  • This option is not applied when creating tests for @Controller classes.

Spring contexts

Check the Use Spring contexts option to enable Spring contexts for dependency injection in tests written by Diffblue Cover.

Active profiles

Use the Active Profiles text box to specify one or more Spring profiles to activate while writing tests (comma separated list). If no profiles are defined, Cover will automatically use the test profile (if available), otherwise the default Spring profile will be used.

Last updated