Return-Path: Delivered-To: apmail-incubator-jspwiki-commits-archive@locus.apache.org Received: (qmail 62340 invoked from network); 8 Mar 2008 19:04:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Mar 2008 19:04:33 -0000 Received: (qmail 95088 invoked by uid 500); 8 Mar 2008 19:04:30 -0000 Delivered-To: apmail-incubator-jspwiki-commits-archive@incubator.apache.org Received: (qmail 95068 invoked by uid 500); 8 Mar 2008 19:04:30 -0000 Mailing-List: contact jspwiki-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-dev@incubator.apache.org Delivered-To: mailing list jspwiki-commits@incubator.apache.org Received: (qmail 95059 invoked by uid 99); 8 Mar 2008 19:04:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Mar 2008 11:04:30 -0800 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.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Mar 2008 19:03:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 12B511A9832; Sat, 8 Mar 2008 11:04:11 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r635045 - /incubator/jspwiki/trunk/tests/etc/selenium/readme.txt Date: Sat, 08 Mar 2008 19:04:10 -0000 To: jspwiki-commits@incubator.apache.org From: ajaquith@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080308190411.12B511A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ajaquith Date: Sat Mar 8 11:04:09 2008 New Revision: 635045 URL: http://svn.apache.org/viewvc?rev=635045&view=rev Log: Doc tweak... Modified: incubator/jspwiki/trunk/tests/etc/selenium/readme.txt Modified: incubator/jspwiki/trunk/tests/etc/selenium/readme.txt URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/etc/selenium/readme.txt?rev=635045&r1=635044&r2=635045&view=diff ============================================================================== --- incubator/jspwiki/trunk/tests/etc/selenium/readme.txt (original) +++ incubator/jspwiki/trunk/tests/etc/selenium/readme.txt Sat Mar 8 11:04:09 2008 @@ -1,11 +1,65 @@ This file is tests/etc/selenium/tests/readme.txt +You can run Selenium web unit tests in one of two ways: + +1) Automatically, using Ant + +2) Manually, using Selenium IDE (a Firefox plugin) + +RUNNING SELENIUM TESTS AUTOMATICALLY +------------------------------------ + Here's a quick start to selenium web unit tests * Type 'ant webtests' from the command line * You may find it useful to restart Tomcat before running webtests +RUNNING SELENIUM TESTS IN FIREFOX +--------------------------------- + +Start Tomcat and deploy the test-custom WAR. + +Start the Selenium server... + +java -jar tests/lib/selenium-server-0.9.2-patched.jar -interactive + +Open Firefox. +Set the browser proxy to localhost:4444 + +Open URL: +chrome://selenium-ide/content/selenium/TestRunner.html?test=file:///Users/arj/workspace/JSPWiki-SVN/tests/build/selenium/test-custom/JSPWikiTestSuite.html&baseURL=http://localhost:8080 + +CREATING TESTS +-------------- +Selenium-IDE is the preferred way to create test files. The master +test suite file is tests/etc/selenium/tests/JSPWikiTestSuite.html. + +You can add a new test file (such as one recorded in Selenium-IDE) to +the suite file by appending a table row like this: + + JSPWikiTestAnonymousView + +Add the new test file (in this case, JSPWikiTestAnonymousView.html) to the test +directory (tests/etc/selenium/tests). + +However, simply adding the file to the suited is NOT enough. To make it run +for all of the five sample webapp contexts we test, you MUST add a short +preamble to each test file so that the Selenium-RC test runner starts at +the correct URL. Here is that preamble: + + store/@selenium.context@/ baseUrl + open $${baseUrl}/Wiki.jsp?page=Main   + +The first line is important: at build time (that is, when the Ant webtests +target executes), the @selenium.context@ variable will be replaced with the +correct test context. You MUST ensure that the first Selenese 'open' command +(such as the one shown in the second line, above) opens to the correct context. +Setting, then using, the ${baseUrl} property is the recommended way. + + +BUILD NOTES +----------- ARJ notes 10-Dec-2007: Note: To get Selenium to work, Dirk patched the following two Selenium-core files, which were re-injected into lib/selenium-server.jar: