Skip to content

Add the possibility to specify custom test annotations via the spring-cloud-contract-maven-plugin #1401

Open
@virgiliu-ratoi-ec-ext

Description

@virgiliu-ratoi-ec-ext

Is your feature request related to a problem? Please describe.
The spring-cloud-contract-maven-plugin has the option of specifying imports and static imports for the generated tests. Sometimes you might need to add some custom annotations to the tests, for instance when using OpenEJB to start a TomEE server with JAX-RS services you have to add the @EnableServices(value = "jaxrs") and @RunWith(ApplicationComposer.class) annotations to each test because they are not inherited from the base test class.

Describe the solution you'd like
The plugin should accept a configuration XML element similar to the existing imports and static imports.

Describe alternatives you've considered
The alternative is to create a separate library which defines a custom JavaTestGenerator and reference it as a dependency but it would be much easier just to define annotation(s) at the configuration level.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions