Class DefaultPropertyBasedCustomizer
java.lang.Object
org.apache.sling.testing.teleporter.client.DefaultPropertyBasedCustomizer
- All Implemented Interfaces:
org.apache.sling.junit.rules.TeleporterRule.Customizer
public class DefaultPropertyBasedCustomizer
extends Object
implements org.apache.sling.junit.rules.TeleporterRule.Customizer
This is the default
It assumes that there is already a running Sling server at the given baseUrl. To provision such a server the slingstart-maven-plugin could be used for example.
The following system properties must be set for this Customizer to work
TeleporterRule.Customizer
which is used in case TeleporterRule.forClass(Class)
was called. It relies on system
properties to configure the important aspects of teleporting. It assumes that there is already a running Sling server at the given baseUrl. To provision such a server the slingstart-maven-plugin could be used for example.
The following system properties must be set for this Customizer to work
ClientSideTeleporter.baseUrl
, the server url on which Sling is already running
ClientSideTeleporter.includeDependencyPrefixes
, comma-separated list of package prefixes for classes referenced from the IT. Only the classes having one of the given package prefix are included in the bundle being deployed to the given Sling instance together with the IT class itself. They are only included though in case they are referenced! If this is not set, no referenced classes will be included.ClientSideTeleporter.excludeDependencyPrefixes
, comma-separated list of package prefixes for classes referenced from the IT. Classes having one of the given package prefix will not be included in the bundle being deployed to the given Sling instance together with the IT class itself. This takes precedence over theClientSideTeleporter.includeDependencyPrefixes
.ClientSideTeleporter.embedClasses
, comma-separated list of fully qualified class names which should be embedded in the test bundle. Use this only for classes which are not detected automatically by the Maven Dependency Analyzer but still should be embedded in the test bundleClientSideTeleporter.embedClassesDirectories
, comma-separated list directories containing class files which should be embedded in the test bundle. Use this only for classes which are not detected automatically by the Maven Dependency Analyzer but still should be embedded in the test bundleClientSideTeleporter.additionalBundleHeaders
, comma-separated list of entries in the format<name>:<value>
which should be added to the test bundle as additional headersClientSideTeleporter.testReadyTimeoutSeconds
, how long to wait for our test to be ready on the server-side in seconds, after installing the test bundle. By default12
.ClientSideTeleporter.serverUsername
, the username with which to send requests to the Sling server. By defaultadmin
.ClientSideTeleporter.serverPassword
, the password with which to send requests to the Sling server. By defaultadmin
.ClientSideTeleporter.enableLogging
, set to true to log the tasks being performed by the teleporter. Useful for debugging.ClientSideTeleporter.preventToUninstallBundle
, set to true to not automatically uninstall the test bundle after test execution. Useful for debugging.ClientSideTeleporter.testBundleDirectory
, if set the test bundles are being persisted (before being installed) within the given directory name. If the directory does not exist, it will be automatically created. Useful for debugging.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DefaultPropertyBasedCustomizer
public DefaultPropertyBasedCustomizer()
-
-
Method Details
-
customize
- Specified by:
customize
in interfaceorg.apache.sling.junit.rules.TeleporterRule.Customizer
-