Isis
  1. Isis
  2. ISIS-228

Use JUnit categories to distinguish between tests that can be run on CI server and those that cannot.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: core-1.0.0
    • Component/s: Core
    • Labels:
      None

      Activity

      Transition Time In Source Status Execution Times Last Executer Last Execution Date
      Open Open Resolved Resolved
      1d 1h 50m 1 Dan Haywood 20/May/12 11:42
      Resolved Resolved Closed Closed
      210d 22h 1m 1 Dan Haywood 17/Dec/12 09:44
      Dan Haywood made changes -
      Status Resolved [ 5 ] Closed [ 6 ]
      Hide
      Dan Haywood added a comment -

      prior to generating 1.0.0 release notes

      Show
      Dan Haywood added a comment - prior to generating 1.0.0 release notes
      Dan Haywood made changes -
      Component/s Core [ 12314152 ]
      Dan Haywood made changes -
      Status Open [ 1 ] Resolved [ 5 ]
      Fix Version/s 0.3.0-incubating [ 12315989 ]
      Resolution Fixed [ 1 ]
      Hide
      Dan Haywood added a comment -

      The suggested approach didn't work, so instead used a naming convention for classes (*IntegrationTest.java)

      Show
      Dan Haywood added a comment - The suggested approach didn't work, so instead used a naming convention for classes (*IntegrationTest.java)
      Hide
      Dan Haywood added a comment -

      This technique fails because JUnit attempts to load the classes defined as categories. Since the definition of surefire is in the top-level POM, these classes (which I had defined in core.testsupport) do not exist.

      A quick search on google shows others hitting the same issue, eg https://github.com/KentBeck/junit/issues/400.

      So instead, am using a naming convention:

      • by default, exclude all IntegrationTest classes
      • if specify -P integtest-mongo, then run only the Mongo*IntegrationTest classes
      • if specify -P integtest-sql, then run only the Sql*IntegrationTest classes

      I haven't yet figured out a way to be able to run both the mongo and sql integration tests in a single run.

      Show
      Dan Haywood added a comment - This technique fails because JUnit attempts to load the classes defined as categories. Since the definition of surefire is in the top-level POM, these classes (which I had defined in core.testsupport) do not exist. A quick search on google shows others hitting the same issue, eg https://github.com/KentBeck/junit/issues/400 . So instead, am using a naming convention: by default, exclude all IntegrationTest classes if specify -P integtest-mongo, then run only the Mongo*IntegrationTest classes if specify -P integtest-sql, then run only the Sql*IntegrationTest classes I haven't yet figured out a way to be able to run both the mongo and sql integration tests in a single run.
      Dan Haywood made changes -
      Field Original Value New Value
      Assignee Dan Haywood [ danhaywood ]
      Dan Haywood created issue -

        People

        • Assignee:
          Dan Haywood
          Reporter:
          Dan Haywood
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development