Revision: 739
          http://jwebunit.svn.sourceforge.net/jwebunit/?rev=739&view=rev
Author:   henryju
Date:     2008-10-07 16:28:07 +0000 (Tue, 07 Oct 2008)

Log Message:
-----------
Updated site documentation (how-to-contribute, selenium part, ...).

Modified Paths:
--------------
    
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java
    trunk/jwebunit-htmlunit-plugin/src/site/xdoc/index.xml
    trunk/jwebunit-selenium-plugin/src/site/xdoc/index.xml
    trunk/src/site/fml/faq.fml
    trunk/src/site/resources/images/jwebunit-architecture.odg
    trunk/src/site/resources/images/jwebunit-architecture.png
    trunk/src/site/site.xml
    trunk/src/site/xdoc/building-maven.xml
    trunk/src/site/xdoc/index.xml

Added Paths:
-----------
    trunk/src/site/xdoc/how-to-contribute.xml

Modified: 
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java
===================================================================
--- 
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java
       2008-10-06 13:30:06 UTC (rev 738)
+++ 
trunk/jwebunit-htmlunit-plugin/src/main/java/net/sourceforge/jwebunit/htmlunit/HtmlUnitTestingEngineImpl.java
       2008-10-07 16:28:07 UTC (rev 739)
@@ -838,7 +838,7 @@
             // If Path==null, cookie is not send to the server.
             wc.getCookieManager().addCookie(
                     new Cookie(c.getDomain() != null ? c.getDomain() : "", c
-                            .getName(), c.getValue(), c.getPath() != null ? c
+                            .getName(), c.getValue(), c.getPath() != null ? c  
                                        
                             .getPath() : "", c.getMaxAge(), c.getSecure()));
         }
         // Deal with custom request header

Modified: trunk/jwebunit-htmlunit-plugin/src/site/xdoc/index.xml
===================================================================
--- trunk/jwebunit-htmlunit-plugin/src/site/xdoc/index.xml      2008-10-06 
13:30:06 UTC (rev 738)
+++ trunk/jwebunit-htmlunit-plugin/src/site/xdoc/index.xml      2008-10-07 
16:28:07 UTC (rev 739)
@@ -90,7 +90,7 @@
     <dependency>
         <groupId>net.sourceforge.jwebunit</groupId>
         <artifactId>jwebunit-htmlunit-plugin</artifactId>
-        <version>1.4</version>
+        <version>2.0</version>
     </dependency>
     ...
 </dependencies>

Modified: trunk/jwebunit-selenium-plugin/src/site/xdoc/index.xml
===================================================================
--- trunk/jwebunit-selenium-plugin/src/site/xdoc/index.xml      2008-10-06 
13:30:06 UTC (rev 738)
+++ trunk/jwebunit-selenium-plugin/src/site/xdoc/index.xml      2008-10-07 
16:28:07 UTC (rev 739)
@@ -1,84 +1,22 @@
 <?xml version="1.0"?>
 <document>
     <properties>
-        <author email="dashorst.at.users.sourceforge.net">Martijn 
Dashorst</author>
+        <author email="henryju.at.users.sourceforge.net">Julien HENRY</author>
         <title>JWebUnit</title>
     </properties>
-    <meta name="keyword" content="jwebunit, java, junit, htmlunit, jacobie, 
httpunit, integration, test, automated, html, webtest"/>
+    <meta name="keyword" content="jwebunit, java, junit, htmlunit, jacobie, 
httpunit, integration, test, automated, html, webtest, selenium"/>
        <head>
                <link rel="shortcut icon" href="../favicon.ico" 
type="image/x-icon" />
        </head>
 <body>
-<section name="HtmlUnit plugin">
+<section name="Selenium plugin">
     <p>
-        The following sample testcases illustrate the conciseness of JWebUnit 
versus HtmlUnit
-        and JUnit alone.  The tests perform a google search
-        for the HtmlUnit home page, navigate to that page from Google, and 
validate that
-        there is a link to the user manual on the HtmlUnit home page.  The 
code in the
-        first column is pure HtmlUnit / JUnit, while the second column uses 
the JWebUnit framework.
+        The Selenium plugin allow to run your test in a real browser. The main 
advantage is the JavaScript support is perfectly identical to
+        your target browser (of course). The main drawbacks are it is 
slooooooow and can't run on a headless server.
     </p>
     <p>
-<table cellspacing="2" border="0">
-<tr><th>JUnit/HtmlUnit Test</th><th>JWebUnit Test</th></tr>
-<tr>
-<td valign="top" nowrap="nowrap">
-<source>
-import java.net.URL;
-
-import com.gargoylesoftware.htmlunit.WebClient;
-import com.gargoylesoftware.htmlunit.html.HtmlAnchor;
-import com.gargoylesoftware.htmlunit.html.HtmlForm;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
-import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
-import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
-
-import junit.framework.TestCase;
-
-public class SearchExample extends TestCase {
-    
-    public void testSearch() throws Exception {
-        final WebClient webClient = new WebClient();
-        final URL url = new URL("http://www.google.com";);
-        final HtmlPage page = (HtmlPage)webClient.getPage(url);
-        HtmlForm form = (HtmlForm) page.getForms().get(0);
-        HtmlTextInput text = (HtmlTextInput) form.getInputByName("q");
-        text.setValueAttribute("HtmlUnit");
-        HtmlSubmitInput btn = (HtmlSubmitInput) form.getInputByName("btnG");
-        HtmlPage page2 = (HtmlPage) btn.click();
-        HtmlAnchor link = 
page2.getAnchorByHref("http://htmlunit.sourceforge.net/";);
-        HtmlPage page3 = (HtmlPage) link.click();
-        assertEquals(page3.getTitleText(), "htmlunit - Welcome to HtmlUnit");
-        assertNotNull(page3.getAnchorByHref("gettingStarted.html"));
-     }
-}
-</source>
-</td>
-<td valign="top" nowrap="nowrap">
-<source>
-import net.sourceforge.jwebunit.util.TestingEngineRegistry;
-import net.sourceforge.jwebunit.junit.WebTestCase;
-
-public class SearchExample extends WebTestCase {
-    
-    public void setUp() {
-        setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_HTMLUNIT);
-        getTestContext().setBaseUrl("http://www.google.com";);
-     }
-    
-    public void testSearch() throws Exception {
-        beginAt("/");
-        setTextField("q", "htmlunit");
-        submit("btnG");
-        clickLinkWithText("HtmlUnit");
-        assertTitleEquals("htmlunit - Welcome to HtmlUnit");
-        assertLinkPresentWithText("Get started");
-     }
-}
-</source>
-</td>
-</tr>
-</table>
-</p>
+        This plugin is still in development. In fact not all test cases works. 
Feel free to <a href="../how-to-contribute.html">contribute</a>
+    </p>
 </section>
 <section name="HowTo manage dependencies with Maven 2">
        <p>
@@ -89,8 +27,8 @@
     ...
     &lt;dependency&gt;
         &lt;groupId&gt;net.sourceforge.jwebunit&lt;/groupId&gt;
-        &lt;artifactId&gt;jwebunit-htmlunit-plugin&lt;/artifactId&gt;
-        &lt;version&gt;1.4&lt;/version&gt;
+        &lt;artifactId&gt;jwebunit-selenium-plugin&lt;/artifactId&gt;
+        &lt;version&gt;2.0&lt;/version&gt;
     &lt;/dependency&gt;
     ...
 &lt;/dependencies&gt;

Modified: trunk/src/site/fml/faq.fml
===================================================================
--- trunk/src/site/fml/faq.fml  2008-10-06 13:30:06 UTC (rev 738)
+++ trunk/src/site/fml/faq.fml  2008-10-07 16:28:07 UTC (rev 739)
@@ -31,6 +31,7 @@
   setScriptingEnabled(true);
   ...
 }</source>
+Have a look at http://htmlunit.sourceforge.net/submittingJSBugs.html
       </answer>
     </faq>
   </part>
@@ -51,4 +52,4 @@
     </faq>
   </part>
   
-</faqs>
\ No newline at end of file
+</faqs>

Modified: trunk/src/site/site.xml
===================================================================
--- trunk/src/site/site.xml     2008-10-06 13:30:06 UTC (rev 738)
+++ trunk/src/site/site.xml     2008-10-07 16:28:07 UTC (rev 739)
@@ -71,6 +71,9 @@
                     href="#Building JWebUnit Web site and reports" />
 
             </item>
+            <item name="How-To contribute"
+                href="/how-to-contribute.html" collapse="true">
+            </item>
         </menu>
         <menu name="Sourceforge">
             <item name="Project page"

Modified: trunk/src/site/xdoc/building-maven.xml
===================================================================
--- trunk/src/site/xdoc/building-maven.xml      2008-10-06 13:30:06 UTC (rev 
738)
+++ trunk/src/site/xdoc/building-maven.xml      2008-10-07 16:28:07 UTC (rev 
739)
@@ -39,7 +39,7 @@
                         <li>
                             add an environment variable MAVEN_HOME which
                             points to the install directory of Maven,
-                            i.e. /opt/apache-maven-2.0.8
+                            i.e. /opt/apache-maven-2.0.9
                         </li>
                         <li>
                             add

Added: trunk/src/site/xdoc/how-to-contribute.xml
===================================================================
--- trunk/src/site/xdoc/how-to-contribute.xml                           (rev 0)
+++ trunk/src/site/xdoc/how-to-contribute.xml   2008-10-07 16:28:07 UTC (rev 
739)
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<document>
+    <properties>
+        <author>Julien Henry</author>
+        <title>How-To contribute to JWebUnit</title>
+    </properties>
+    <body class="default">
+        <section name="How-To contribute to JWebUnit">
+            <p>
+                JWebUnit is an open-source project and is looking for 
contributors. Please read the following sections if you plan to help.
+            </p>
+            <subsection name="What needs to be done?">
+                <p>
+                    Here are some ideas:
+                    <ul>
+                        <li>
+                            Improve Selenium plugin (should ideally pass 100% 
unit tests). May need some modifications of the API.
+                        </li>
+                        <li>
+                            Improve Web 2.0 support (AJAX, drag&amp;drop, 
focus, mouse clicks, keypress, ...). Will need additions/modifications of the 
API.
+                        </li>
+                        <li>
+                            Take advantage of Java 5 (migrate to JUnit 4, use 
generics, ...)
+                        </li>
+                        <li>
+                            Create a record tool like SeleniumIDE or 
WebTestRecorder.
+                        </li>
+                    </ul>
+                    Of course these are simple suggestions and you can propose 
many different things.
+                </p>
+            </subsection>
+            <subsection name="OK, I want to help. How to start with?">
+                <p>
+                    First, you need to do your homeworks. Checkout latest code 
from trunk then try to <a href="building-maven.html">build JWebUnit with 
Maven</a>.
+                </p>
+                <p>
+                    Please subscribe to the developper mailing-list and tell 
me what feature you are working on.
+                </p>
+                <p>
+                    I will review your first contribution and if it doesn't 
break anything you will certainly be granted with commit rights (you need a 
sourceforge account for that).
+                </p>
+            </subsection>
+        </section>
+    </body>
+</document>

Modified: trunk/src/site/xdoc/index.xml
===================================================================
--- trunk/src/site/xdoc/index.xml       2008-10-06 13:30:06 UTC (rev 738)
+++ trunk/src/site/xdoc/index.xml       2008-10-07 16:28:07 UTC (rev 739)
@@ -2,7 +2,7 @@
 <document>
     <properties>
         <author email="dashorst.at.users.sourceforge.net">Martijn 
Dashorst</author>
-        <title>JWebUnit 1.x</title>
+        <title>JWebUnit</title>
     </properties>
     <meta name="keyword" content="jwebunit, java, junit, htmlunit, jacobie, 
httpunit, integration, test, automated, html, webtest"/>
        <head>
@@ -11,10 +11,16 @@
 <body>
 <section name="Welcome">
     <p>
-        You are on the JWebUnit 1.x website. Current version is 1.5. This is
-        the "stable" version of JWebUnit. You can also consult <a 
href="2.x/index.html">JWebUnit 2.x website</a>.
+        You are on the JWebUnit website. Current version is 2.0. This is
+        the "stable" version of JWebUnit. This version requires Java 1.5.
     </p>
 </section>
+<section name="Please help JWebUnit  !!">
+    <p>
+        JWebUnit is not dead but is looking for contributors. The current 
maintainer will only be able to do quick fix, a bit of support on the
+        mailing-list and perfom releases. If you want new functionalities feel 
free to <a href="how-to-contribute.html">contribute</a>.
+    </p>
+</section>
 <section name="What is JWebUnit?">
     <p>
         JWebUnit is a Java framework that facilitates creation of acceptance 
tests for web applications. It 
@@ -27,13 +33,14 @@
 </section>
 <section name="What does JWebUnit provide?">
     <p>
-        JWebUnit provides a high-level API for navigating a web application 
combined with a set
+        JWebUnit provides a high-level Java API for navigating a web 
application combined with a set
         of assertions to verify the application's correctness. This includes 
navigation
         via links, form entry and submission, validation of table contents, 
and other
         typical business web application features. This code try to stay 
independent of the libraries behind
         the scenes. The simple navigation methods and ready-to-use assertions 
allow for
         more rapid test creation than using only JUnit and HtmlUnit. And if 
you want to switch
-        from HtmlUnit to the other soon available plugins, no need to rewrite 
your tests.
+        from HtmlUnit to the other soon available plugins, no need to rewrite 
your tests (in the past, the HttpUnit to HtmlUnit migration was done
+        with only minor API changes).
     </p>
     <img src="images/jwebunit-architecture.png" alt="JWebUnit architecture"/>
 </section>


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to