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 2015/04/30 09:56:38 UTC
svn commit: r1676917 - in /sling/trunk/launchpad:
integration-tests/README.txt testing/README.txt testing/pom.xml
Author: kwin
Date: Thu Apr 30 07:56:38 2015
New Revision: 1676917
URL: http://svn.apache.org/r1676917
Log:
SLING-4674: clarify how the integration tests can be debugged (server- and client-side)
Modified:
sling/trunk/launchpad/integration-tests/README.txt
sling/trunk/launchpad/testing/README.txt
sling/trunk/launchpad/testing/pom.xml
Modified: sling/trunk/launchpad/integration-tests/README.txt
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/README.txt?rev=1676917&r1=1676916&r2=1676917&view=diff
==============================================================================
--- sling/trunk/launchpad/integration-tests/README.txt (original)
+++ sling/trunk/launchpad/integration-tests/README.txt Thu Apr 30 07:56:38 2015
@@ -6,7 +6,7 @@ separated in their own jar to be reusabl
To run a single test or a specific set of tests against a running Sling
instance, use for example:
- mvn test -Dtest=UploadFileTest
+ 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
@@ -32,14 +32,15 @@ are excluded, to switch to them use -Dsl
To run the tests against the same instance that is used in the full build,
start an instance by running
- mvn launchpad:run
+ mvn slingstart:start -Dlaunchpad.keep.running=true
in the launchpad/testing folder, optionally using -Dsling.run.modes=oak to
-use Oak instead of Jackrabbit.
+use Oak instead of Jackrabbit. Since that instance is using an arbitrary
+http port you have to give exactly that port as parameter if you execute the test.
The standard -Dmaven.surefire.debug option can be used to debug the tests
-themselves. To debug the server-side Sling code, set the appropriate JVM
-options on the VM that runs it.
+themselves. Have a look at the README.txt in the launchpad.testing module on how
+to debug the server-side Sling code.
Note that, for all tests to pass, the Sling instance under test needs the
org.apache.sling.launchpad.test-services bundle, and the war file of the
Modified: sling/trunk/launchpad/testing/README.txt
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/testing/README.txt?rev=1676917&r1=1676916&r2=1676917&view=diff
==============================================================================
--- sling/trunk/launchpad/testing/README.txt (original)
+++ sling/trunk/launchpad/testing/README.txt Thu Apr 30 07:56:38 2015
@@ -29,12 +29,14 @@ See the Subversion documentation for oth
Integration tests
-----------------
This module runs number of integration tests provided by the sibling
-integration-tests module.
+integration-tests module. By default the instance is started, then the
+integration-tests are executed and the instance is being shutdown again.
-To run individual tests, see the README.txt in that module.
+To run individual tests, see the README.txt in the integration-tests module.
Use mvn slingstart:start -Dlaunchpad.keep.running=true to start this test instance.
-It allows you to run and debug individual tests against it. The standard MAVEN_OPTS
-environment variable can be used to activate debugging of the Sling instance that's
-being tested.
+It allows you to run and debug individual tests against it (on client-side).
+To debug this instance on server-side start with mvn slingstart:run -Dlaunchpad.keep.running=true -Ddebug.
+That allows to connect to it via Java Remote Debugging on port 8000.
+You can stop the instance via Ctrl+C.
Modified: sling/trunk/launchpad/testing/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/testing/pom.xml?rev=1676917&r1=1676916&r2=1676917&view=diff
==============================================================================
--- sling/trunk/launchpad/testing/pom.xml (original)
+++ sling/trunk/launchpad/testing/pom.xml Thu Apr 30 07:56:38 2015
@@ -46,8 +46,7 @@
<properties>
<sling.java.version>7</sling.java.version>
- <!-- HTTP port to use when running mvn launchpad:run -->
- <run.http.port>8888</run.http.port>
+ <sling.default.vm.options>-Xmx1024m -XX:MaxPermSize=256m -Djava.awt.headless=true</sling.default.vm.options>
<!-- path suffix for HTTP access to Sling -->
<http.base.path />
@@ -112,6 +111,7 @@
<controlPort>${sling.control.port}</controlPort>
<runmode>${sling.run.modes}</runmode>
<contextPath>${http.base.path}</contextPath>
+ <vmOpts>${sling.vm.options}</vmOpts>
</server>
</servers>
</configuration>
@@ -207,6 +207,28 @@
<max.port>41799</max.port>
</properties>
</profile>
+ <profile>
+ <id>debug</id>
+ <activation>
+ <property>
+ <name>debug</name>
+ </property>
+ </activation>
+ <properties>
+ <sling.vm.options>${sling.default.vm.options} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000</sling.vm.options>
+ </properties>
+ </profile>
+ <profile>
+ <id>no-debug</id>
+ <activation>
+ <property>
+ <name>!debug</name>
+ </property>
+ </activation>
+ <properties>
+ <sling.vm.options>${sling.default.vm.options}</sling.vm.options>
+ </properties>
+ </profile>
</profiles>
<dependencies>