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

      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.
      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 -

      prior to generating 1.0.0 release notes

      Show
      Dan Haywood added a comment - prior to generating 1.0.0 release notes

        People

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

          Dates

          • Created:
            Updated:
            Resolved:

            Development