Apache Sling Launchpad Integration Tests

Clone this repo:
  1. 87158cf SLING-9351 - Deprecate org.apache.launchpad.test-services-war by Robert Munteanu · 5 weeks ago master
  2. 49e5c94 SLING-9327 - adapt pom so that test work in jdk11, with minimal changes by Bertrand Delacretaz · 8 weeks ago
  3. 344ce62 Use latest versions of our junit modules by Bertrand Delacretaz · 9 weeks ago
  4. 65c22ca SLING-8768 : Revert test changes due to reverting SLING-2534 by Carsten Ziegeler · 7 months ago
  5. 9b271bf SLING-7935 - Consolidate all 'launchpad-testing' modules into a single git repository by Robert Munteanu · 11 months ago

Build Status Maven Central JavaDocs License launchpad

Apache Sling Launchpad Integration Tests

This module is part of the Apache Sling project.

This module contains test classes used by the launchpad/testing module, separated in their own jar to be reusable.

To run a single test or a specific set of tests against a running Sling instance, use for example:

mvn test -Dtest=UploadFileTest -Dhttp.port=1234

Where UploadFileTest is the test to run. Wildcards are allowed, and test classes are found in the src/main folder (not a typo - that's not src/test as we want to pack the tests in the jar file that we build).

See the section in pom.xml for additional parameters that the tests use.

Here's another example, running the tests against a Sling instance running on host xyzzy, port 1234, with the Sling main servlet mounted under /foo:

mvn -o -s /dev/null test
-Dlaunchpad.readiness.mediatype=.json:application/json \ -Dtest=/integrationtest//*Test.java

To run the tests against the same instance that is used in the full build, start an instance by running

mvn clean install -Dlaunchpad.keep.running=true -Dhttp.port=8080 -Ddebug=true

in the launchpad/testing folder (-Ddebug is optional).

And use the same -Dhttp.port option to run tests here.

The standard -Dmaven.surefire.debug option can be used to debug the tests themselves. Have a look at the README.txt in the launchpad.testing module on how to debug the server-side Sling code.

If using a Sling instance that's not setup by the launchpad/testing module, note that for all tests to pass that instance needs the org.apache.sling.launchpad.test-services bundle to be active and the war file of the launchpad/test-services-war project to be be copied to the sling/startup/0 folder before starting Sling.