-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Open
Labels
in: testIssues in the test moduleIssues in the test moduletype: enhancementA general enhancementA general enhancement
Milestone
Description
Collaborator
Issue body actions
Eugen Paraschiv opened SPR-9338 and commented
It would be extremely useful if @ActiveProfiles
were supported for both methods as well as entire classes; this would enable much more granular support for switching between profiles (without needing to create an new test class) which is useful for some specific use cases of profiles (where this kind of granularity makes perfect sense).
Affects: 3.1 GA
Issue Links:
- Support @ContextConfiguration at method level [SPR-12031] #16647 Support
@ContextConfiguration
at method level - Support @TestPropertySource at method level [SPR-14378] #18951 Support
@TestPropertySource
at method level
bedla
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test moduletype: enhancementA general enhancementA general enhancement
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
spring-projects-issues commentedon May 11, 2012
Chris Beams commented
Interesting idea. Sam, perhaps you considered this at some point? At a glance, I don't see a reason why it couldn't be supported. It would of course require creating a new
ApplicationContext
for any methods so annotated, but we already have precedent for that with@DirtiesContext
.Sam can weigh in about feasibility here, but as I just mentioned in #12524, this would also probably make for a good pull request if you're interested in taking a shot at it. Here's the link to the contributor guidelines again.
spring-projects-issues commentedon May 11, 2012
Chris Beams commented
Assigning to you Sam; see my previous comment.
spring-projects-issues commentedon Jul 13, 2016
Sam Brannen commented
This is closely related to #16647.