Skip to content

Improve documentation of transactional support in the TestContext framework [SPR-11399] #16026

Closed as not planned

Description

@spring-projects-issues

Sam Brannen opened SPR-11399 and commented

Status Quo

The documentation in the reference manual for transactional support in the Spring TestContext Framework (TCF) is currently very lacking. Currently there are only two examples:

  • FictitiousTransactionalTest: a JUnit-based POJO test class that demonstrates the usage of all annotations related to transactions in the TCF, but in a less than exemplary fashion.
  • AbstractClinicTests: an extension of AbstractTransactionalJUnit4SpringContextTests that demonstrates the use of countRowsInTable() but not much else.

So, although there are two examples in the reference manual, neither of these demonstrates best practices or typical usage scenarios. Furthermore, there are zero examples using TestNG.


Deliverables

  1. Delete the AbstractClinicTests example and create a similar JUnit-based example in the "Transaction management" or "JUnit support classes" section.
  2. Repurpose content from the "PetClinic Example" section as a new "Best Practices" section.
  3. Create a TestNG-based example that is directly analogous to the new JUnit-based example, for comparison purposes.
  4. Add TestNG content related to the discussion in Support @Transactional on TestNG @BeforeClass methods in the TestContext framework [SPR-11397] #16024.
  5. Add TestNG content related to the discussion in AbstractTransactionalTestNGSpringContextTests not working as expected when an EJB with TransactionAttribute.REQUIRES_NEW is encountered [SPR-6132] #10800.

Affects: 3.0 GA

Issue Links:

Activity

  1. self-assigned this
    on Jan 15, 2019
  2. modified the milestones: 6.x Backlog, 6.0.x on Nov 11, 2021
  3. modified the milestones: 6.0.x, 6.1.x on Jul 4, 2023
  4. modified the milestones: 6.1.x, 6.x Backlog on Aug 19, 2023
  5. removed their assignment
    on May 12, 2024
  6. removed this from the General Backlog milestone on Oct 23, 2026
  7. added
    status: declinedA suggestion or change that we don't feel we should currently apply
    on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: testIssues in the test modulestatus: declinedA suggestion or change that we don't feel we should currently applytype: documentationA documentation task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions