Return-Path: Delivered-To: apmail-sling-commits-archive@www.apache.org Received: (qmail 88213 invoked from network); 3 Jun 2010 11:10:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Jun 2010 11:10:40 -0000 Received: (qmail 96952 invoked by uid 500); 3 Jun 2010 11:10:40 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 96883 invoked by uid 500); 3 Jun 2010 11:10:39 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 96876 invoked by uid 99); 3 Jun 2010 11:10:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jun 2010 11:10:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jun 2010 11:10:35 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id DFB6A23889EA; Thu, 3 Jun 2010 11:10:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r950956 - in /sling/trunk/launchpad: integration-tests/ integration-tests/README.txt integration-tests/pom.xml testing/README.txt Date: Thu, 03 Jun 2010 11:10:13 -0000 To: commits@sling.apache.org From: bdelacretaz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100603111013.DFB6A23889EA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bdelacretaz Date: Thu Jun 3 11:10:13 2010 New Revision: 950956 URL: http://svn.apache.org/viewvc?rev=950956&view=rev Log: SLING-1543 - allow for running single tests from the integration-tests module Added: sling/trunk/launchpad/integration-tests/README.txt (with props) Modified: sling/trunk/launchpad/integration-tests/ (props changed) sling/trunk/launchpad/integration-tests/pom.xml sling/trunk/launchpad/testing/README.txt Propchange: sling/trunk/launchpad/integration-tests/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Thu Jun 3 11:10:13 2010 @@ -0,0 +1,12 @@ +target +bin +logs +derby.log +*.iml +*.ipr +*.iws +.settings +.project +.classpath +.externalToolBuilders +maven-eclipse.xml Added: sling/trunk/launchpad/integration-tests/README.txt URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/README.txt?rev=950956&view=auto ============================================================================== --- sling/trunk/launchpad/integration-tests/README.txt (added) +++ sling/trunk/launchpad/integration-tests/README.txt Thu Jun 3 11:10:13 2010 @@ -0,0 +1,27 @@ +Apache Sling integration-tests module +------------------------------------- +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 + +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 \ + -Dhttp.port=1234 \ + -Dtest.host=xyzzy \ + -Dhttp.base.path=foo \ + -Dwebdav.workspace.path=foo \ + -Dtest=**/integrationtest/**/*Test.java + Propchange: sling/trunk/launchpad/integration-tests/README.txt ------------------------------------------------------------------------------ svn:eol-style = native Modified: sling/trunk/launchpad/integration-tests/pom.xml URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/pom.xml?rev=950956&r1=950955&r2=950956&view=diff ============================================================================== --- sling/trunk/launchpad/integration-tests/pom.xml (original) +++ sling/trunk/launchpad/integration-tests/pom.xml Thu Jun 3 11:10:13 2010 @@ -33,7 +33,24 @@ Sling Integration Tests, contains integration tests that are used by the testing project and other upstream testing projects. - + + + + + 8888 + + + + + + + + + localhost + + + 62 + scm:svn:http://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests @@ -41,6 +58,55 @@ http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests + + + + runTests + + + test + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + ${project.build.outputDirectory} + + + + launchpad.http.server.url + + http://${test.host}:${http.port}/${http.base.path} + + + + launchpad.webdav.server.url + + http://${test.host}:${http.port}/${webdav.workspace.path} + + + + HttpTestBase.readyTimeoutSeconds + + ${HttpTestBase.readyTimeoutSeconds} + + + + + + + + + + @@ -81,5 +147,10 @@ 4.8.1 compile + + org.slf4j + slf4j-simple + test + - + \ No newline at end of file Modified: sling/trunk/launchpad/testing/README.txt URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/testing/README.txt?rev=950956&r1=950955&r2=950956&view=diff ============================================================================== --- sling/trunk/launchpad/testing/README.txt (original) +++ sling/trunk/launchpad/testing/README.txt Thu Jun 3 11:10:13 2010 @@ -1,8 +1,7 @@ Apache Sling Launchpad Testing module -This module builds a Sling webapp using bundles from the trunk, and -runs integration tests (that were previously in the launchpad/webapp -module) on them. +This module builds a Sling instance using bundles from the trunk, and +runs integration tests against it, via HTTP. Getting Started @@ -28,97 +27,9 @@ you can checkout the latest source using See the Subversion documentation for other source control features. - -How to run this ---------------- - NOTE: "mvn clean" does not delete the "sling" work directory - make sure to - delete it manually if you want to start from a clean state. - -1) Build all Sling bundles - - cd - mvn clean install - -2) Build and run this - - cd launchpad/testing - mvn clean package jetty:run - -Once the webapp starts, http://localhost:8888/system/console should display the Felix -OSGi console. - -4) Test node creation and display -To create a node with curl: - - curl -D - -Ftitle=something http://admin:admin@localhost:8888/testing/this - -Then, http://admin:admin@localhost:8888/testing/this should display a default HTML -representation, including the value of the "title" property. - -Add a txt or json extension to see other output formats. - Integration tests ----------------- -This module provides a number of integration tests, that run automatically when -doing a full build, and test Sling via its client HTTP interfaces. - -These tests can also be run against another instance of Sling, for example to -test it in another web container than the embedded Jetty that is used during the -Maven build. - -See pom.xml for the parameters that control these integration tests. Here's an -example of running them against a Sling instance running on host xyzzy, port 1234, -with the Sling webapp mounted under /foo: - - mvn -o -s /dev/null test \ - -Dhttp.port=1234 \ - -Dtest.host=xyzzy \ - -Dhttp.base.path=foo \ - -Dwebdav.workspace.path=foo/dav/default \ - -Dtest=**/integrationtest/**/*Test.java - -The -s /dev/null parameter disables all your local Maven settings, to make sure -they don't interfere (and it's different under Windows). Feel free to remove that -if you know what you're doing. - -To run a single test, other values can be used for the "-Dtest" parameter. To -leave this launchpad/testing instance running and run individual tests again -it, for example, use: - - mvn launchpad:run - -and in another terminal: - - mvn test -Dhttp.port=8888 -Dtest=TestClassSelectionNamePattern - -This is very useful during development: you can leave a Sling instance -running, update bundles in it using the mvn autoInstallBundle profile, and run -specific integration tests quickly from another terminal. - -JCR Install Integration tests ------------------------------ - -This module also contains integration tests for the JCR Install module. These -tests are disabled by default, since they may not be of general interest. To -include the JCR Install tests in the integration tests run enable the -jcrinstall-tests profile such as in - - mvn -P jcrinstall-tests integration-test - -*** WARNING: the jcrinstall-tests do not work in revision 741168, due to changes -in the start levels. They can be run according to the scenario below, if you -change the default bundles start level to 30, after starting the Sling instance -with mvn jetty:run, from http://localhost:8888/system/console/vmstat. *** - -To run the jcrinstall integration tests quickly, without having to start the -webapp first: - -1. Run mvn clean package jetty:run -P jcrinstall-tests in a first console - -(1.5 see WARNING above - adjust the default bundles start level) - -2. In another console run +This module runs number of integration tests provided by the sibling +integration-tests module. - mvn test -Pjcrinstall-tests -Dtest=**/integrationtest/jcrinstall/**/*Test.java - - +To run individual tests, see the README.txt in that module. \ No newline at end of file