Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-3181

Use the *IT.java name pattern to separate between unit and integration tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • Best practices
    • None

    Description

      When a module contains both unit and integration tests, naming integration test classes *IT allows the surefire and failsafe plugins to automatically select the right tests, without requiring pom configurations.

      In the bundles/scripting/core module for example, the BindingsValuesProvidersByContextIT test is run in the integration-tests phase, and other tests in the test phase, based only on the test names:

      src/test/java/org/apache/sling/scripting/core/impl/BindingsValuesProvidersByContextIT.java
      src/test/java/org/apache/sling/scripting/core/impl/DummyScriptEngineFactory.java
      src/test/java/org/apache/sling/scripting/core/impl/helper/ProtectedBindingsTest.java
      src/test/java/org/apache/sling/scripting/core/impl/LogWriterTest.java
      src/test/java/org/apache/sling/scripting/core/impl/ScriptEngineManagerFactoryTest.java

      Attachments

        Activity

          People

            Unassigned Unassigned
            bdelacretaz Bertrand Delacretaz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: