Skip to content

Support @TestPropertySource at method level [SPR-14378] #18951

Open
@spring-projects-issues

Description

@spring-projects-issues

Justin Knowles opened SPR-14378 and commented

@TestPropertySource allows you to set test-suite / class-level properties, but I want test-level properties so I can test drive classes with @ConditionalOnProperty and @Value(${var:default}) type annotations for correct behavior.

I have considered creating separate test suites for each test, but that seems unnatural. I currently manually manage the context within the test to validate the behavior.


Issue Links:

8 votes, 14 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions