myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wsm...@apache.org
Subject svn commit: r429134 - in /myfaces/tomahawk/trunk/core/src/site: apt/testing/ apt/testing/selenium.apt site.xml
Date Sun, 06 Aug 2006 15:07:28 GMT
Author: wsmoak
Date: Sun Aug  6 08:07:27 2006
New Revision: 429134

URL: http://svn.apache.org/viewvc?rev=429134&view=rev
Log:
Added documentation for the Selenium profile and tests.
TOMAHAWK-583

Added:
    myfaces/tomahawk/trunk/core/src/site/apt/testing/
    myfaces/tomahawk/trunk/core/src/site/apt/testing/selenium.apt
Modified:
    myfaces/tomahawk/trunk/core/src/site/site.xml

Added: myfaces/tomahawk/trunk/core/src/site/apt/testing/selenium.apt
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/site/apt/testing/selenium.apt?rev=429134&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/site/apt/testing/selenium.apt (added)
+++ myfaces/tomahawk/trunk/core/src/site/apt/testing/selenium.apt Sun Aug  6 08:07:27 2006
@@ -0,0 +1,121 @@
+         -----------
+         Selenium Testing
+         -----------
+
+Selenium Testing
+
+ <<{{{http://selenium.openqa.org}Selenium}}>> is a test tool for web
+ applications. Unlike HtmlUnit or HttpUnit tests which <simulate> a browser,
+ Selenium tests run directly in a real browser such as Firefox or Internet
+ Explorer. The Selenium JavaScript code is deployed alongside your running
+ application, and interacts with it just as your users do.
+
+ MyFaces uses Selenium for functional testing of the example apps.
+ The following example apps include Selenium tests:
+
+  * MyFaces Example Simple
+
+* Install
+
+ Selenium is available in OpenQA's Maven repository, so no installation is
+ necessary.
+
+ However, you may want to download the Selenium distribution (which includes
+ the documentation) from
+ {{{http://www.openqa.org/selenium-core/download.action}
+ http://www.openqa.org/selenium-core/download.action}}.
+
+ While you're there, also install the Firefox plugin <<Selenium IDE>> from
+ {{{http://www.openqa.org/selenium-ide/}
+ http://www.openqa.org/selenium-ide/}}.
+
+* Package
+
+ <<Package>> the webapp with the 'selenium' profile activated.
+
+ The {{{http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/pom.xml
+ ?view=markup}tomahawk-examples-project pom}} includes a 'selenium' profile that
+ will
+
+  * unpack the Selenium jar under 'target'
+
+  * copy the 'core' directory from the unpacked Selenium jar into the
+  webapp
+
+  * copy any files in 'src/test/selenium' into the webapp
+
+  []
+
++-----+
+mvn package -P selenium
++-----+
+
+  The webapp will contain the following additional directories: 'selenium/core'
+  and 'selenium/tests'.
+
+* Deploy
+
+  <<Deploy>> the webapp to your favorite container. The Cargo plugin is
+  configured to make this easy:
+
++-----+
+mvn package cargo:start -P selenium
+
+   or
+
+mvn package cargo:start -P selenium -Dcargo.tomcat5x.home=/path/to/tomcat5
++-----+
+
+ [TODO] Add info on how to start and deploy to Jetty.
+
+* Run
+
+ <<Run>> the tests with the Selenium TestRunner.
+
+ * Visit <<<http://localhost:8080/<appname>/selenium/core/TestRunner.html>>>
+
+ * Click 'go' in the top left frame to load the TestSuite.html page
+
+ * Click 'All' in the top right frame to run the tests
+
+ []
+
+ <<Run>> the tests <automatically>.
+
+ * Append <<<?test=../tests/TestSuite.html&auto=true>>>
+ to the TestRunner.html URL
+
+ []
+
+ After it runs the tests automatically, Selenium will <<<POST>>> the results
to
+ the default URL of <<<../postResults>>>. Since nothing is there to process
the
+ request, you will see a 404 Not Found error page in the bottom frame.
+
+
+* Edit
+
+  <<Edit>> an existing test, or write a new one.
+
+  If you add a new test, remember to add it to src/test/selenium/TestSuite.html
+  so the TestRunner will find it.
+
+** Selenium IDE
+
+  The Selenium IDE Firefox plugin is the easiest way to edit tests. With the
+  example app running, open the HTML file (src/test/selenium/SomeTest.html)
+  from your svn checkout of Shale. Use the IDE to edit and run the test, and
+  save your changes.
+
+  <<Note>>: Your changes will not be visible to the TestRunner in the deployed
+  webapp unless you re-package and deploy it.
+
+** HTML Editor
+
+  Selenium tests are written in plain HTML tables, so you may edit them with any
+  text editor.
+
+  If you prefer to edit the tests 'in place' in the running webapp, simply copy
+  the files back to your svn checkout directory and commit the changes or submit
+  a patch .
+
+

Modified: myfaces/tomahawk/trunk/core/src/site/site.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/site/site.xml?rev=429134&r1=429133&r2=429134&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/site/site.xml (original)
+++ myfaces/tomahawk/trunk/core/src/site/site.xml Sun Aug  6 08:07:27 2006
@@ -76,6 +76,9 @@
 	    <item name="Tiles Support" href="tiles.html"/>  
 	  </menu>    
 	
+      <menu name="Testing">
+        <item name="OpenQA Selenium" href="/testing/selenium.html"/>
+      </menu>
 	  ${reports}
     
   </body>



Mime
View raw message