You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2016/09/23 08:16:39 UTC

svn commit: r1762023 - /sling/site/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.mdtext

Author: kwin
Date: Fri Sep 23 08:16:39 2016
New Revision: 1762023

URL: http://svn.apache.org/viewvc?rev=1762023&view=rev
Log:
minor fixes

Modified:
    sling/site/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.mdtext

Modified: sling/site/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.mdtext?rev=1762023&r1=1762022&r2=1762023&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.mdtext (original)
+++ sling/site/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.mdtext Fri Sep 23 08:16:39 2016
@@ -2,7 +2,7 @@ Title: JUnit server-side testing support
 
 This is an overview of the Sling bundles that provide support for server-side JUnit tests. 
 
-The Maven modules below [`testing\samples`](https://svn.apache.org/repos/asf/sling/trunk/testing/samples) 
+The Maven modules below [`testing/samples`](https://svn.apache.org/repos/asf/sling/trunk/testing/samples) 
 provide different examples including HTTP-based and server-side teleported tests in a 
 bundle module, running against a full Sling instance setup in the same Maven module.
 
@@ -70,7 +70,7 @@ selection, like for example:
 
     final StringTransformer t = teleporter.getService(StringTransformer.class, "(mode=uppercase)");
 
-The method waits for the service to be available or until the timeout elapsed [SLING-6031](https://issues.apache.org/jira/browse/SLING-6031).
+The method waits for the service to be available or until the timeout elapsed ([SLING-6031](https://issues.apache.org/jira/browse/SLING-6031)).
 
 And starting with version 1.0.4 of the `org.apache.sling.junit.teleporter` bundle, you can specify
 resources to embed in the test bundle, as in this example:
@@ -134,19 +134,26 @@ If `TeleporterRule.forClass(getClass())`
 
 The following customizers are currently used in Sling
 
-1. *[Default Customizer](https://svn.apache.org/repos/asf/sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/DefaultPropertyBasedCustomizer.java)* is used by default when no other customizer is referenced in `TeleporterRule.forClass(getClass())`. It relies on the following system properties:
-| Property Name                | Description                                     | Mandatory to set | Default value
-|------------------------------|-------------------------------------------------|------------------| -----
+### Default Customizer ###
+
+*[DefaultPropertyBasedCustomizer.java](https://svn.apache.org/repos/asf/sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/DefaultPropertyBasedCustomizer.java)* is used by default when no other customizer is referenced in `TeleporterRule.forClass(getClass())`. It relies on the following system properties:
+
+| Property Name                | Description                                     | Mandatory to set | Default value |
+|------------------------------|-------------------------------------------------|------------------| ----- |
 | ClientSideTeleporter.baseUrl | base url of the Sling Server to which to deploy | yes | - |
 | 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. | no | - |
 | 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 the `ClientSideTeleporter.includeDependencyPrefixes`. | no | - |
 | ClientSideTeleporter.testReadyTimeoutSeconds | how long to wait for our test to be ready on the server-side in seconds, after installing the test bundle. | no | 12 |
 | ClientSideTeleporter.serverUsername | the username with which to send requests to the Sling server. | no | admin |
 | ClientSideTeleporter.serverPassword | the password with which to send requests to the Sling server. | no | admin |
+
 The provisioning of an appropriate instance can be done with the [slingstart-maven-plugin]({{ refs.slingstart.path }}). An example for that is given at [`testing/samples/module-with-it`](https://svn.apache.org/viewvc/sling/trunk/testing/samples/module-with-it).
-1. The *[`LaunchpadCustomizer`](https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/junit/teleporter/customizers/LaunchpadCustomizer.java)*, which only verifies that a Sling instance is ready 
-at a given port and configures the `ClientSideTeleporter` to deploy to `http://localhost:8888` with the credentials `admin`:`admin`. `LaunchpadCustomizer` uses the `HttpTestBase` therefore some parameters are customizable through System Parameters. There is no bootstrapping of an instance done here, so this must be done separately!
-1. The *[`BWIT_TeleporterCustomizer`](http://svn.apache.org/viewvc/sling/trunk/testing/samples/bundle-with-it/src/test/java/org/apache/sling/junit/teleporter/customizers/BWIT_TeleporterCustomizer.java]* which is based on `SlingTestBase` to set the server's base url and credentials. Additionally the test bundle is adjusted so that the API is not included in it (but rather referenced from another bundle). The bootstrapping of the Sling instance is tweaked through system properties which are desribed [here](http://labs.6dglobal.com/blog/2013-06-05/creating-integration-tests-apache-sling/) and implicitly done by the customizer itself.
+
+#### LaunchpadCustomizer ####
+The *[`LaunchpadCustomizer.java`](https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/junit/teleporter/customizers/LaunchpadCustomizer.java)* only verifies that a Sling instance is ready at a given port and configures the `ClientSideTeleporter` to deploy to `http://localhost:8888` with the credentials `admin`:`admin`. `LaunchpadCustomizer` uses the `HttpTestBase` therefore some parameters are customizable through system properties. There is no bootstrapping of an instance done here, so this must be done separately!
+
+#### BWIT_TeleporterCustomizer ####
+The *[`BWIT_TeleporterCustomizer.java`](http://svn.apache.org/viewvc/sling/trunk/testing/samples/bundle-with-it/src/test/java/org/apache/sling/junit/teleporter/customizers/BWIT_TeleporterCustomizer.java)* relies on `SlingTestBase` to set the server's base url and credentials. Additionally the test bundle is adjusted so that the API is not included in it (but rather referenced from another bundle). The bootstrapping of the Sling instance is tweaked through system properties which are desribed [here](http://labs.6dglobal.com/blog/2013-06-05/creating-integration-tests-apache-sling/) and implicitly done by the customizer itself.
 
 Those should give you an overview on what can be done with a customizer and decide whether you need to write your own one or using the default customizer is just enough.