Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-498

POJO tests have only partially implemented fixture support

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.7.2
    • JUnit 3.x support
    • None
    • Patch

    Description

      The current support for POJO executes each test method, and before and after each test method there is a method on PojoTestSet executed for fixture setup and teardown. In the executeMethod() method, there are try/catch blocks around a delegated method (setUpFixture() and tearDownFixture()) but the implementation of those two methods is empty. So under no circumstances is setup or teardown able to occur, except with in each method.

      I've attached a patch which looks up the setUp() and tearDown() public methods on the pojo test class, and if such exist, executes them appropriately. All the try/catch logic is already there - it just needed the last step of deciding what these methods were going to be called, and calling them.

      Attachments

        1. fixture.diff
          2 kB
          Christian E Gruber
        2. fixture.diff
          4 kB
          Christian E Gruber

        Activity

          People

            krosenvold Kristian Rosenvold
            cgruber Christian E Gruber
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: