Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-17101

Add the ability to specify active profiles in @SpringJUnitConfig

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Test
    • Labels:
    • Last commented by a User:
      true

      Description

      It would be cool if you could set the profile for testing right in this annotation.

      Now, i must write 2 annotations in every test:

      @SpringJUnitConfig
      @ActiveProfiles("test")

      Want write something like this:

      @SpringJUnitConfig(profiles = "test")

      I think, most JUnit tests uses custom test profile.

      Why not using system property? Because if you develop with IDE, for example, IntelliJ IDEA, you can run test by one click and IDEA must know, which profile must be used for this test.

        Attachments

          Activity

            People

            Assignee:
            sbrannen Sam Brannen
            Reporter:
            altro Alexey Trofimov
            Last updater:
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 31 weeks, 3 days ago