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

Provide meta-annotation support for test-related annotations

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 3.0.5
    • Fix Version/s: 4.0 RC1
    • Component/s: Test
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      Overview

      Spring 3.0 already allows component stereotypes to be used in a meta-annotation fashion, for example by creating a custom @TransactionalService stereotype annotation which combines @Transactional and @Service in a single, reusable, application-specific annotation.

      As mentioned in various forums, a JIRA comment, and discussions I've had with Spring users, it would be beneficial to provide similar meta-annotation support for test-related annotations.

      Given a custom @TransactionalTest stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See UserRepositoryIntegrationTests for an example.

      Notes on JUnit

      Naturally, Spring cannot provide meta-annotation support for JUnit's @RunWith annotation, since @RunWith is processed by JUnit internals. Developers would therefore still be required to specify SpringJUnit4ClassRunner as the runner for each individual test class.


      Deliverables

      Provide meta-annotation support for the following annotations within the context of the TestContext framework.

      1. @ContextConfiguration
      2. @WebAppConfiguration
      3. @ContextHierarchy
      4. @ActiveProfiles
      5. @DirtiesContext
      6. @TestExecutionListeners
      7. @IfProfileValue
      8. @ProfileValueSourceConfiguration
      9. @Transactional
      10. @BeforeTransaction
      11. @AfterTransaction
      12. @TransactionConfiguration
      13. @Rollback
      14. @Repeat
      15. @Timed

      Code Examples

      @TransactionalTest _stereotype_

      @Transactional
      @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
      public @interface TransactionalTest {}

      UserRepositoryIntegrationTests

      @TransactionalTest
      @RunWith(SpringJUnit4ClassRunner.class)
      public class UserRepositoryIntegrationTests { /* ... */ }


      Further Resources


        Issue Links

          Activity

          sbrannen Sam Brannen created issue -
          sbrannen Sam Brannen made changes -
          Field Original Value New Value
          Fix Version/s 3.1 RC1 [ 11107 ]
          Fix Version/s 3.1 M2 [ 11379 ]
          cbeams Chris Beams made changes -
          Fix Version/s General Backlog [ 12209 ]
          Fix Version/s 3.1 Backlog [ 11107 ]
          sbrannen Sam Brannen made changes -
          Fix Version/s 3.2 Backlog [ 11128 ]
          Fix Version/s General Backlog [ 12209 ]
          sbrannen Sam Brannen made changes -
          Link This issue is related to SPR-8710 [ SPR-8710 ]
          tmarshall Trevor Marshall made changes -
          Workflow SPR Workflow [ 44681 ] New SPR Workflow [ 56420 ]
          tmarshall Trevor Marshall made changes -
          Workflow New SPR Workflow [ 56420 ] SPR Workflow [ 66824 ]
          sbrannen Sam Brannen made changes -
          Description h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation for support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          h4. Affected Test-related Annotations

          Meta-annotation support should potentially be provided for the following annotations.

          - @TestExecutionListeners
          - @ContextConfiguration
          - @DirtiesContext
          - @IfProfileValue
          - @ProfileValueSourceConfiguration
          - @Transactional
          - @TransactionConfiguration

          h4. Code Examples

          {code:[email protected]}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}
          h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation for support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          h4. Affected Test-related Annotations

          Meta-annotation support should potentially be provided for the following annotations.

          - {{@TestExecutionListeners}}
          - {{@ContextConfiguration}}
          - {{@ActiveProfiles}}
          - {{@DirtiesContext}}
          - {{@WebAppConfiguration}}
          - {{@IfProfileValue}}
          - {{@ProfileValueSourceConfiguration}}
          - {{@Transactional}}
          - {{@TransactionConfiguration}}

          h4. Code Examples

          {code:[email protected]}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}
          sbrannen Sam Brannen made changes -
          Fix Version/s 3.2 RC2 [ 13611 ]
          Fix Version/s 3.2 Backlog [ 11128 ]
          cbeams Chris Beams made changes -
          Fix Version/s 3.3 Backlog [ 13218 ]
          Fix Version/s 3.2 RC2 [ 13611 ]
          sbrannen Sam Brannen made changes -
          Fix Version/s 4.0 M2 [ 13909 ]
          Fix Version/s 4.0 Backlog [ 13218 ]
          sbrannen Sam Brannen made changes -
          Fix Version/s 4.0 RC1 [ 13910 ]
          Fix Version/s 4.0 M2 [ 13909 ]
          sbrannen Sam Brannen made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          juergen.hoeller Juergen Hoeller made changes -
          Fix Version/s 4.0 RC1 [ 14211 ]
          Fix Version/s 4.0 M3 [ 13910 ]
          sbrannen Sam Brannen made changes -
          Description h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation for support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          h4. Affected Test-related Annotations

          Meta-annotation support should potentially be provided for the following annotations.

          - {{@TestExecutionListeners}}
          - {{@ContextConfiguration}}
          - {{@ActiveProfiles}}
          - {{@DirtiesContext}}
          - {{@WebAppConfiguration}}
          - {{@IfProfileValue}}
          - {{@ProfileValueSourceConfiguration}}
          - {{@Transactional}}
          - {{@TransactionConfiguration}}

          h4. Code Examples

          {code:[email protected]}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}
          h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation for support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          h4. Affected Test-related Annotations

          Meta-annotation support should potentially be provided for the following annotations.

          - {{@TestExecutionListeners}}
          - {{@ContextConfiguration}}
          - {{@ContextHierarchy}}
          - {{@ActiveProfiles}}
          - {{@DirtiesContext}}
          - {{@WebAppConfiguration}}
          - {{@IfProfileValue}}
          - {{@ProfileValueSourceConfiguration}}
          - {{@Transactional}}
          - {{@TransactionConfiguration}}

          h4. Code Examples

          {code:[email protected]}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}
          sbrannen Sam Brannen made changes -
          Description h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation for support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          h4. Affected Test-related Annotations

          Meta-annotation support should potentially be provided for the following annotations.

          - {{@TestExecutionListeners}}
          - {{@ContextConfiguration}}
          - {{@ContextHierarchy}}
          - {{@ActiveProfiles}}
          - {{@DirtiesContext}}
          - {{@WebAppConfiguration}}
          - {{@IfProfileValue}}
          - {{@ProfileValueSourceConfiguration}}
          - {{@Transactional}}
          - {{@TransactionConfiguration}}

          h4. Code Examples

          {code:[email protected]}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}
          h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          h4. Affected Test-related Annotations

          Meta-annotation support should potentially be provided for the following annotations.

          - {{@TestExecutionListeners}}
          - {{@ContextConfiguration}}
          - {{@ContextHierarchy}}
          - {{@ActiveProfiles}}
          - {{@DirtiesContext}}
          - {{@WebAppConfiguration}}
          - {{@IfProfileValue}}
          - {{@ProfileValueSourceConfiguration}}
          - {{@Transactional}}
          - {{@TransactionConfiguration}}

          h4. Code Examples

          {code:[email protected]}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}
          sbrannen Sam Brannen made changes -
          Description h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          h4. Affected Test-related Annotations

          Meta-annotation support should potentially be provided for the following annotations.

          - {{@TestExecutionListeners}}
          - {{@ContextConfiguration}}
          - {{@ContextHierarchy}}
          - {{@ActiveProfiles}}
          - {{@DirtiesContext}}
          - {{@WebAppConfiguration}}
          - {{@IfProfileValue}}
          - {{@ProfileValueSourceConfiguration}}
          - {{@Transactional}}
          - {{@TransactionConfiguration}}

          h4. Code Examples

          {code:[email protected]}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}
          h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Affected Test-related Annotations

          Meta-annotation support should potentially be provided for the following annotations.

          - {{@TestExecutionListeners}}
          - {{@ContextConfiguration}}
          - {{@ContextHierarchy}}
          - {{@ActiveProfiles}}
          - {{@DirtiesContext}}
          - {{@WebAppConfiguration}}
          - {{@IfProfileValue}}
          - {{@ProfileValueSourceConfiguration}}
          - {{@Transactional}}
          - {{@TransactionConfiguration}}

          ----
          h4. Code Examples

          {code:[email protected]}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          sbrannen Sam Brannen made changes -
          Description h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Affected Test-related Annotations

          Meta-annotation support should potentially be provided for the following annotations.

          - {{@TestExecutionListeners}}
          - {{@ContextConfiguration}}
          - {{@ContextHierarchy}}
          - {{@ActiveProfiles}}
          - {{@DirtiesContext}}
          - {{@WebAppConfiguration}}
          - {{@IfProfileValue}}
          - {{@ProfileValueSourceConfiguration}}
          - {{@Transactional}}
          - {{@TransactionConfiguration}}

          ----
          h4. Code Examples

          {code:[email protected]}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (!) {{@TestExecutionListeners}}
          # (!) {{@ContextConfiguration}}
          # (!) {{@ContextHierarchy}}
          # (!) {{@ActiveProfiles}}
          # (!) {{@DirtiesContext}}
          # (!) {{@WebAppConfiguration}}
          # (!) {{@IfProfileValue}}
          # (!) {{@ProfileValueSourceConfiguration}}
          # (!) {{@Transactional}}
          # (!) {{@TransactionConfiguration}}

          ----
          h4. Code Examples

          {code:[email protected]}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          sbrannen Sam Brannen made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          sbrannen Sam Brannen made changes -
          Description h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (!) {{@TestExecutionListeners}}
          # (!) {{@ContextConfiguration}}
          # (!) {{@ContextHierarchy}}
          # (!) {{@ActiveProfiles}}
          # (!) {{@DirtiesContext}}
          # (!) {{@WebAppConfiguration}}
          # (!) {{@IfProfileValue}}
          # (!) {{@ProfileValueSourceConfiguration}}
          # (!) {{@Transactional}}
          # (!) {{@TransactionConfiguration}}

          ----
          h4. Code Examples

          {code:[email protected]}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (!) {{@TestExecutionListeners}}
          # (!) {{@ContextConfiguration}}
          # (!) {{@ContextHierarchy}}
          # (!) {{@ActiveProfiles}}
          # (!) {{@DirtiesContext}}
          # (!) {{@WebAppConfiguration}}
          # (!) {{@IfProfileValue}}
          # (!) {{@ProfileValueSourceConfiguration}}
          # (!) {{@Transactional}}
          # (!) {{@TransactionConfiguration}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          sbrannen Sam Brannen made changes -
          Description h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (!) {{@TestExecutionListeners}}
          # (!) {{@ContextConfiguration}}
          # (!) {{@ContextHierarchy}}
          # (!) {{@ActiveProfiles}}
          # (!) {{@DirtiesContext}}
          # (!) {{@WebAppConfiguration}}
          # (!) {{@IfProfileValue}}
          # (!) {{@ProfileValueSourceConfiguration}}
          # (!) {{@Transactional}}
          # (!) {{@TransactionConfiguration}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (!) {{@TestExecutionListeners}}
          # (!) {{@ContextConfiguration}}
          # (!) {{@ContextHierarchy}}
          # (!) {{@ActiveProfiles}}
          # (!) {{@DirtiesContext}}
          # (!) {{@WebAppConfiguration}}
          # (!) {{@IfProfileValue}}
          # (!) {{@ProfileValueSourceConfiguration}}
          # (!) {{@Transactional}}
          # (!) {{@TransactionConfiguration}}
          # (!) {{@Rollback}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          sbrannen Sam Brannen made changes -
          Description h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (!) {{@TestExecutionListeners}}
          # (!) {{@ContextConfiguration}}
          # (!) {{@ContextHierarchy}}
          # (!) {{@ActiveProfiles}}
          # (!) {{@DirtiesContext}}
          # (!) {{@WebAppConfiguration}}
          # (!) {{@IfProfileValue}}
          # (!) {{@ProfileValueSourceConfiguration}}
          # (!) {{@Transactional}}
          # (!) {{@TransactionConfiguration}}
          # (!) {{@Rollback}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (/) {{@TestExecutionListeners}}
          # (/) {{@ContextConfiguration}}
          # (/) {{@ContextHierarchy}}
          # (/) {{@ActiveProfiles}}
          # (/) {{@DirtiesContext}}
          # (!) {{@WebAppConfiguration}}
          # (/) {{@IfProfileValue}}
          # (/) {{@ProfileValueSourceConfiguration}}
          # (/) {{@Transactional}}
          # (/) {{@TransactionConfiguration}}
          # (/) {{@Rollback}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          sbrannen Sam Brannen made changes -
          Description h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (/) {{@TestExecutionListeners}}
          # (/) {{@ContextConfiguration}}
          # (/) {{@ContextHierarchy}}
          # (/) {{@ActiveProfiles}}
          # (/) {{@DirtiesContext}}
          # (!) {{@WebAppConfiguration}}
          # (/) {{@IfProfileValue}}
          # (/) {{@ProfileValueSourceConfiguration}}
          # (/) {{@Transactional}}
          # (/) {{@TransactionConfiguration}}
          # (/) {{@Rollback}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (/) {{@TestExecutionListeners}}
          # (/) {{@ContextConfiguration}}
          # (/) {{@ContextHierarchy}}
          # (/) {{@ActiveProfiles}}
          # (/) {{@DirtiesContext}}
          # (/) {{@IfProfileValue}}
          # (/) {{@ProfileValueSourceConfiguration}}
          # (/) {{@Transactional}}
          # (/) {{@TransactionConfiguration}}
          # (/) {{@Rollback}}
          # (!) {{@WebAppConfiguration}}
          # (!) {{@Repeat}}
          # (!) {{@Timed}}
          # (!) {{@BeforeTransaction}}
          # (!) {{@AfterTransaction}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          sbrannen Sam Brannen made changes -
          Description h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (/) {{@TestExecutionListeners}}
          # (/) {{@ContextConfiguration}}
          # (/) {{@ContextHierarchy}}
          # (/) {{@ActiveProfiles}}
          # (/) {{@DirtiesContext}}
          # (/) {{@IfProfileValue}}
          # (/) {{@ProfileValueSourceConfiguration}}
          # (/) {{@Transactional}}
          # (/) {{@TransactionConfiguration}}
          # (/) {{@Rollback}}
          # (!) {{@WebAppConfiguration}}
          # (!) {{@Repeat}}
          # (!) {{@Timed}}
          # (!) {{@BeforeTransaction}}
          # (!) {{@AfterTransaction}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (/) {{@TestExecutionListeners}}
          # (/) {{@ContextConfiguration}}
          # (/) {{@ContextHierarchy}}
          # (/) {{@ActiveProfiles}}
          # (/) {{@DirtiesContext}}
          # (/) {{@IfProfileValue}}
          # (/) {{@ProfileValueSourceConfiguration}}
          # (/) {{@Transactional}}
          # (/) {{@TransactionConfiguration}}
          # (/) {{@Rollback}}
          # (!) {{@WebAppConfiguration}}
          # (!) {{@Repeat}}
          # (!) {{@Timed}}
          # (/) {{@BeforeTransaction}}
          # (/) {{@AfterTransaction}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          sbrannen Sam Brannen made changes -
          Description h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (/) {{@TestExecutionListeners}}
          # (/) {{@ContextConfiguration}}
          # (/) {{@ContextHierarchy}}
          # (/) {{@ActiveProfiles}}
          # (/) {{@DirtiesContext}}
          # (/) {{@IfProfileValue}}
          # (/) {{@ProfileValueSourceConfiguration}}
          # (/) {{@Transactional}}
          # (/) {{@TransactionConfiguration}}
          # (/) {{@Rollback}}
          # (!) {{@WebAppConfiguration}}
          # (!) {{@Repeat}}
          # (!) {{@Timed}}
          # (/) {{@BeforeTransaction}}
          # (/) {{@AfterTransaction}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (/) {{@TestExecutionListeners}}
          # (/) {{@ContextConfiguration}}
          # (/) {{@ContextHierarchy}}
          # (/) {{@ActiveProfiles}}
          # (/) {{@DirtiesContext}}
          # (/) {{@IfProfileValue}}
          # (/) {{@ProfileValueSourceConfiguration}}
          # (/) {{@Transactional}}
          # (/) {{@TransactionConfiguration}}
          # (/) {{@Rollback}}
          # (!) {{@WebAppConfiguration}}
          # (/) {{@Repeat}}
          # (/) {{@Timed}}
          # (/) {{@BeforeTransaction}}
          # (/) {{@AfterTransaction}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          sbrannen Sam Brannen made changes -
          Description h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (/) {{@TestExecutionListeners}}
          # (/) {{@ContextConfiguration}}
          # (/) {{@ContextHierarchy}}
          # (/) {{@ActiveProfiles}}
          # (/) {{@DirtiesContext}}
          # (/) {{@IfProfileValue}}
          # (/) {{@ProfileValueSourceConfiguration}}
          # (/) {{@Transactional}}
          # (/) {{@TransactionConfiguration}}
          # (/) {{@Rollback}}
          # (!) {{@WebAppConfiguration}}
          # (/) {{@Repeat}}
          # (/) {{@Timed}}
          # (/) {{@BeforeTransaction}}
          # (/) {{@AfterTransaction}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (/) {{@TestExecutionListeners}}
          # (/) {{@ContextConfiguration}}
          # (/) {{@ContextHierarchy}}
          # (/) {{@ActiveProfiles}}
          # (/) {{@DirtiesContext}}
          # (/) {{@IfProfileValue}}
          # (/) {{@ProfileValueSourceConfiguration}}
          # (/) {{@Transactional}}
          # (/) {{@TransactionConfiguration}}
          # (/) {{@Rollback}}
          # (/) {{@WebAppConfiguration}}
          # (/) {{@Repeat}}
          # (/) {{@Timed}}
          # (/) {{@BeforeTransaction}}
          # (/) {{@AfterTransaction}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          sbrannen Sam Brannen made changes -
          Description h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (/) {{@TestExecutionListeners}}
          # (/) {{@ContextConfiguration}}
          # (/) {{@ContextHierarchy}}
          # (/) {{@ActiveProfiles}}
          # (/) {{@DirtiesContext}}
          # (/) {{@IfProfileValue}}
          # (/) {{@ProfileValueSourceConfiguration}}
          # (/) {{@Transactional}}
          # (/) {{@TransactionConfiguration}}
          # (/) {{@Rollback}}
          # (/) {{@WebAppConfiguration}}
          # (/) {{@Repeat}}
          # (/) {{@Timed}}
          # (/) {{@BeforeTransaction}}
          # (/) {{@AfterTransaction}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          h4. Overview

          Spring 3.0 already allows component stereotypes to be used in a _meta-annotation_ fashion, for example by creating a custom {{@TransactionalService}} stereotype annotation which combines {{@Transactional}} and {{@Service}} in a single, reusable, application-specific annotation.

          As mentioned in various forums, [a JIRA comment|https://jira.springsource.org/browse/SPR-7754?focusedCommentId=61545&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_61545], and discussions I've had with Spring users, it would be beneficial to provide similar _meta-annotation_ support for test-related annotations.

          Given a custom {{@TransactionalTest}} stereotype annotation (see code listing below), multiple test classes in the application's test suite could rely on centralized configuration of the context and transaction configuration and thus avoid unnecessary duplication. See {{UserRepositoryIntegrationTests}} for an example.

          h6. Notes on JUnit

          Naturally, Spring cannot provide meta-annotation support for JUnit's {{@RunWith}} annotation, since {{@RunWith}} is processed by JUnit internals. Developers would therefore still be required to specify {{SpringJUnit4ClassRunner}} as the runner for each individual test class.

          ----
          h4. Deliverables

          Provide meta-annotation support for the following annotations within the context of the TestContext framework.

          # (/) {{@ContextConfiguration}}
          # (/) {{@WebAppConfiguration}}
          # (/) {{@ContextHierarchy}}
          # (/) {{@ActiveProfiles}}
          # (/) {{@DirtiesContext}}
          # (/) {{@TestExecutionListeners}}
          # (/) {{@IfProfileValue}}
          # (/) {{@ProfileValueSourceConfiguration}}
          # (/) {{@Transactional}}
          # (/) {{@BeforeTransaction}}
          # (/) {{@AfterTransaction}}
          # (/) {{@TransactionConfiguration}}
          # (/) {{@Rollback}}
          # (/) {{@Repeat}}
          # (/) {{@Timed}}

          ----
          h4. Code Examples

          {code:[email protected] _stereotype_}
          @Transactional
          @ContextConfiguration({"/app-config.xml", "/test-data-access-config.xml"})
          public @interface TransactionalTest {}
          {code}

          {code:title=UserRepositoryIntegrationTests}
          @TransactionalTest
          @RunWith(SpringJUnit4ClassRunner.class)
          public class UserRepositoryIntegrationTests { /* ... */ }
          {code}

          ----
          h4. Further Resources

          - JUnit: [All JUnit annotations should be able to be applied as meta-annotations|https://github.com/junit-team/junit/issues/194/]
          - JUnit: [@RunWith(MetaAnnotations.class)|https://github.com/junit-team/junit/issues/202]


          ----
          sbrannen Sam Brannen made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          sbrannen Sam Brannen made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Complete [ 8 ]
          sbrannen Sam Brannen made changes -
          Link This issue is depended on by SPR-11038 [ SPR-11038 ]
          sbrannen Sam Brannen made changes -
          Link This issue is related to SPR-11038 [ SPR-11038 ]
          sbrannen Sam Brannen made changes -
          Link This issue is depended on by SPR-11038 [ SPR-11038 ]
          pwebb Phil Webb made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          sbrannen Sam Brannen made changes -
          Link This issue is depended on by SPR-11109 [ SPR-11109 ]
          sbrannen Sam Brannen made changes -
          Link This issue is related to SPR-11108 [ SPR-11108 ]
          sbrannen Sam Brannen made changes -
          Link This issue is related to SPR-8710 [ SPR-8710 ]
          sbrannen Sam Brannen made changes -
          Link This issue is related to SPR-11455 [ SPR-11455 ]

            People

            • Assignee:
              sbrannen Sam Brannen
              Reporter:
              sbrannen Sam Brannen
              Last updater:
              Sam Brannen
            • Votes:
              8 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 12 weeks, 4 days ago