Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-3774

Use Maven Surefire Plugin to run unit tests and Maven Failsafe Plugin to run integration tests. Unit tests follow the **/Test*.java **/*Test.java **/*TestCase.java naming conventions.

    XMLWordPrintable

    Details

    • Complexity:
      Medium

      Description

      Implement, document, and start a new convention for us that:

      • Use the Maven Surefire Plugin to run unit tests (we do this already) and the Maven Failsafe Plugin (need to add this) to run integration tests.
      • We name all unit tests like **/*Test.java
      • We name all integration tests like **/*IT.java **/*ITCase.java.
      • Integration tests (ending in IT) are not run unless you specify the "integration" profile (typically people won't do this in development, but we'll do it in CI)
        • we need to configure the pom.xmls to make this happen.
      • Update our CI scripts to pass "-Pintegration" to the maven build
      • Write a wiki page to document this
      • Send a dev list email to announce the new convention. Point out our the first test that follows this new convention.

      (see http://stackoverflow.com/questions/2606572/junit-splitting-integration-test-and-unit-tests )

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              wyclif Wyclif Luyima
              Reporter:
              kiranreddy Kiran Reddy
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day
                  1d