jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajaqu...@apache.org
Subject svn commit: r635045 - /incubator/jspwiki/trunk/tests/etc/selenium/readme.txt
Date Sat, 08 Mar 2008 19:04:10 GMT
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:
+
+        <tr><td><a href="./JSPWikiTestAnonymousView.html">JSPWikiTestAnonymousView</a></td></tr>
+
+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:
+
+    <tr><td>store</td><td>/@selenium.context@/</td>	<td>baseUrl</td></tr>
+    <tr><td>open</td>	<td>$${baseUrl}/Wiki.jsp?page=Main</td>
<td>&nbsp;</td></tr>
+
+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:



Mime
View raw message