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

svn commit: r998049 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/org-apache-sling-junit-bundles.html

Author: buildbot
Date: Fri Sep 23 08:16:48 2016
New Revision: 998049

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    websites/staging/sling/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Sep 23 08:16:48 2016
@@ -1 +1 @@
-1762021
+1762023

Modified: websites/staging/sling/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.html (original)
+++ websites/staging/sling/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.html Fri Sep 23 08:16:48 2016
@@ -115,7 +115,7 @@ h2:hover > .headerlink, h3:hover > .head
 }
 h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink, dt:hover > .elementid-permalink { visibility: visible }</style>
 <p>This is an overview of the Sling bundles that provide support for server-side JUnit tests. </p>
-<p>The Maven modules below <a href="https://svn.apache.org/repos/asf/sling/trunk/testing/samples"><code>testing\samples</code></a> 
+<p>The Maven modules below <a href="https://svn.apache.org/repos/asf/sling/trunk/testing/samples"><code>testing/samples</code></a> 
 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.</p>
 <h2 id="orgapacheslingjunitcore-server-side-junit-tests-support">org.apache.sling.junit.core: server-side JUnit tests support<a class="headerlink" href="#orgapacheslingjunitcore-server-side-junit-tests-support" title="Permanent link">&para;</a></h2>
@@ -179,7 +179,7 @@ selection, like for example:</p>
 </pre></div>
 
 
-<p>The method waits for the service to be available or until the timeout elapsed <a href="https://issues.apache.org/jira/browse/SLING-6031">SLING-6031</a>.</p>
+<p>The method waits for the service to be available or until the timeout elapsed (<a href="https://issues.apache.org/jira/browse/SLING-6031">SLING-6031</a>).</p>
 <p>And starting with version 1.0.4 of the <code>org.apache.sling.junit.teleporter</code> bundle, you can specify
 resources to embed in the test bundle, as in this example:</p>
 <div class="codehilite"><pre><span class="p">@</span><span class="n">Rule</span>
@@ -230,21 +230,61 @@ of that string that follows the first co
 classes which are used only on the client side when running tests. </p>
 <p>If <code>TeleporterRule.forClass(getClass())</code> is used (the method without an additional 2nd parameter) the default customizer is used (<a href="https://issues.apache.org/jira/browse/SLING-5677">SLING-5677</a>, since version 1.0.8). </p>
 <p>The following customizers are currently used in Sling</p>
-<ol>
-<li><em><a href="https://svn.apache.org/repos/asf/sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/DefaultPropertyBasedCustomizer.java">Default Customizer</a></em> is used by default when no other customizer is referenced in <code>TeleporterRule.forClass(getClass())</code>. 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 <code>ClientSideTeleporter.includeDependencyPrefixes</code>. | 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 <a href="/documentation/development/slingstart.html">slingstart-maven-plugin</a>. An example for that is given at <a href="https://svn.apache.org/viewvc/sling/trunk/testing/samples/module-with-it"><code>testing/samples/module-with-it</code></a>.</li>
-<li>The <em><a href="https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/junit/teleporter/customizers/LaunchpadCustomizer.java"><code>LaunchpadCustomizer</code></a></em>, which only verifies that a Sling instance is ready 
-at a given port and configures the <code>ClientSideTeleporter</code> to deploy to <code>http://localhost:8888</code> with the credentials <code>admin</code>:<code>admin</code>. <code>LaunchpadCustomizer</code> uses the <code>HttpTestBase</code> therefore some parameters are customizable through System Parameters. There is no bootstrapping of an instance done here, so this must be done separately!</li>
-<li>The <em>[<code>BWIT_TeleporterCustomizer</code>](http://svn.apache.org/viewvc/sling/trunk/testing/samples/bundle-with-it/src/test/java/org/apache/sling/junit/teleporter/customizers/BWIT_TeleporterCustomizer.java]</em> which is based on <code>SlingTestBase</code> 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 <a href="http://labs.6dglobal.com/blog/2013-06-05/creating-integration-tests-apache-sling/">here</a> and implicitly done by the customizer itself.</li>
-</ol>
+<h3 id="default-customizer">Default Customizer<a class="headerlink" href="#default-customizer" title="Permanent link">&para;</a></h3>
+<p><em><a href="https://svn.apache.org/repos/asf/sling/trunk/testing/junit/teleporter/src/main/java/org/apache/sling/testing/teleporter/client/DefaultPropertyBasedCustomizer.java">DefaultPropertyBasedCustomizer.java</a></em> is used by default when no other customizer is referenced in <code>TeleporterRule.forClass(getClass())</code>. It relies on the following system properties:</p>
+<table class="table">
+<thead>
+<tr>
+<th>Property Name</th>
+<th>Description</th>
+<th>Mandatory to set</th>
+<th>Default value</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>ClientSideTeleporter.baseUrl</td>
+<td>base url of the Sling Server to which to deploy</td>
+<td>yes</td>
+<td>-</td>
+</tr>
+<tr>
+<td>ClientSideTeleporter.includeDependencyPrefixes</td>
+<td>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.</td>
+<td>no</td>
+<td>-</td>
+</tr>
+<tr>
+<td>ClientSideTeleporter.excludeDependencyPrefixes</td>
+<td>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 <code>ClientSideTeleporter.includeDependencyPrefixes</code>.</td>
+<td>no</td>
+<td>-</td>
+</tr>
+<tr>
+<td>ClientSideTeleporter.testReadyTimeoutSeconds</td>
+<td>how long to wait for our test to be ready on the server-side in seconds, after installing the test bundle.</td>
+<td>no</td>
+<td>12</td>
+</tr>
+<tr>
+<td>ClientSideTeleporter.serverUsername</td>
+<td>the username with which to send requests to the Sling server.</td>
+<td>no</td>
+<td>admin</td>
+</tr>
+<tr>
+<td>ClientSideTeleporter.serverPassword</td>
+<td>the password with which to send requests to the Sling server.</td>
+<td>no</td>
+<td>admin</td>
+</tr>
+</tbody>
+</table>
+<p>The provisioning of an appropriate instance can be done with the <a href="/documentation/development/slingstart.html">slingstart-maven-plugin</a>. An example for that is given at <a href="https://svn.apache.org/viewvc/sling/trunk/testing/samples/module-with-it"><code>testing/samples/module-with-it</code></a>.</p>
+<h4 id="launchpadcustomizer">LaunchpadCustomizer<a class="headerlink" href="#launchpadcustomizer" title="Permanent link">&para;</a></h4>
+<p>The <em><a href="https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/junit/teleporter/customizers/LaunchpadCustomizer.java"><code>LaunchpadCustomizer.java</code></a></em> only verifies that a Sling instance is ready at a given port and configures the <code>ClientSideTeleporter</code> to deploy to <code>http://localhost:8888</code> with the credentials <code>admin</code>:<code>admin</code>. <code>LaunchpadCustomizer</code> uses the <code>HttpTestBase</code> therefore some parameters are customizable through system properties. There is no bootstrapping of an instance done here, so this must be done separately!</p>
+<h4 id="bwit_teleportercustomizer">BWIT_TeleporterCustomizer<a class="headerlink" href="#bwit_teleportercustomizer" title="Permanent link">&para;</a></h4>
+<p>The <em><a href="http://svn.apache.org/viewvc/sling/trunk/testing/samples/bundle-with-it/src/test/java/org/apache/sling/junit/teleporter/customizers/BWIT_TeleporterCustomizer.java"><code>BWIT_TeleporterCustomizer.java</code></a></em> relies on <code>SlingTestBase</code> 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 <a href="http://labs.6dglobal.com/blog/2013-06-05/creating-integration-tests-apache-sling/">here</a> and implicitly done by the customizer itself.</p>
 <p>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.</p>
 <h2 id="orgapacheslingjunithealthcheck-run-junit-tests-as-sling-health-checks">org.apache.sling.junit.healthcheck: run JUnit tests as Sling Health Checks<a class="headerlink" href="#orgapacheslingjunithealthcheck-run-junit-tests-as-sling-health-checks" title="Permanent link">&para;</a></h2>
 <p>This bundle allows JUnit tests to run as <a href="/documentation/bundles/sling-health-check-tool.html">Sling Health Checks</a>,
@@ -290,7 +330,7 @@ same request again.      </p>
 but using the newer <code>TeleporterRule</code> described above is much simpler. As a result, this bundle
 should only be needed for existing tests that were written using its mechanisms.   </p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1762021 by kwin on Fri, 23 Sep 2016 08:11:05 +0000
+        Rev. 1762023 by kwin on Fri, 23 Sep 2016 08:16:39 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project