You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by rd...@apache.org on 2008/11/29 13:39:31 UTC

svn commit: r721673 - in /james/protocol-tester/trunk: main/src/main/java/org/apache/james/mpt/ main/src/site/xdoc/ src/ src/site/ src/site/resources/ src/site/resources/images/ src/site/xdoc/

Author: rdonkin
Date: Sat Nov 29 04:39:30 2008
New Revision: 721673

URL: http://svn.apache.org/viewvc?rev=721673&view=rev
Log:
Improved documentation

Added:
    james/protocol-tester/trunk/src/   (with props)
    james/protocol-tester/trunk/src/site/
    james/protocol-tester/trunk/src/site/resources/
    james/protocol-tester/trunk/src/site/resources/images/
    james/protocol-tester/trunk/src/site/site.xml   (contents, props changed)
      - copied, changed from r721650, james/protocol-tester/trunk/main/src/site/site.xml
    james/protocol-tester/trunk/src/site/xdoc/
    james/protocol-tester/trunk/src/site/xdoc/index.xml   (contents, props changed)
      - copied, changed from r721659, james/protocol-tester/trunk/main/src/site/xdoc/index.xml
Modified:
    james/protocol-tester/trunk/main/src/main/java/org/apache/james/mpt/ExternalHostSystem.java
    james/protocol-tester/trunk/main/src/main/java/org/apache/james/mpt/HostSystem.java
    james/protocol-tester/trunk/main/src/site/xdoc/index.xml

Modified: james/protocol-tester/trunk/main/src/main/java/org/apache/james/mpt/ExternalHostSystem.java
URL: http://svn.apache.org/viewvc/james/protocol-tester/trunk/main/src/main/java/org/apache/james/mpt/ExternalHostSystem.java?rev=721673&r1=721672&r2=721673&view=diff
==============================================================================
--- james/protocol-tester/trunk/main/src/main/java/org/apache/james/mpt/ExternalHostSystem.java (original)
+++ james/protocol-tester/trunk/main/src/main/java/org/apache/james/mpt/ExternalHostSystem.java Sat Nov 29 04:39:30 2008
@@ -21,10 +21,16 @@
 
 
 /**
- * Connects to a host system serving on an open port.
+ * <p>Connects to a host system serving on an open port.</p>
+ * <p>
+ * This is typically used for functional integration testing of a complete
+ * server system (including sockets). Apache James MPT AntLib provides an
+ * <a href='http://ant.apache.org' rel='tag'>Ant</a> task suitable for this
+ * use case.
+ * </p>
  */
 public class ExternalHostSystem extends ExternalSessionFactory implements HostSystem {
-
+    
     private final UserAdder userAdder;
 
     /**

Modified: james/protocol-tester/trunk/main/src/main/java/org/apache/james/mpt/HostSystem.java
URL: http://svn.apache.org/viewvc/james/protocol-tester/trunk/main/src/main/java/org/apache/james/mpt/HostSystem.java?rev=721673&r1=721672&r2=721673&view=diff
==============================================================================
--- james/protocol-tester/trunk/main/src/main/java/org/apache/james/mpt/HostSystem.java (original)
+++ james/protocol-tester/trunk/main/src/main/java/org/apache/james/mpt/HostSystem.java Sat Nov 29 04:39:30 2008
@@ -20,8 +20,16 @@
 package org.apache.james.mpt;
 
 /**
- * Host system under test.
- * @see Session supports multiple connection to the host system
+ * <p>Host system under test.</p>
+ * <p>
+ * This interface encapsulates the interaction between the server
+ * under test and the test framework. MPT can be used to test components
+ * without the need to serve the protocol though a socket by creating a 
+ * suitable implementation of this interface.
+ * </p>
+ * @see ExternalHostSystem  ExternalHostSystem (a <code>HostSystem</code> for servers
+ * running independently)
+ * @see Session Session (supports multiple connection to the host system)
  */
 public interface HostSystem extends SessionFactory {
 

Modified: james/protocol-tester/trunk/main/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/james/protocol-tester/trunk/main/src/site/xdoc/index.xml?rev=721673&r1=721672&r2=721673&view=diff
==============================================================================
--- james/protocol-tester/trunk/main/src/site/xdoc/index.xml (original)
+++ james/protocol-tester/trunk/main/src/site/xdoc/index.xml Sat Nov 29 04:39:30 2008
@@ -30,8 +30,49 @@
 <p>
 Apache James Mail Protocol Tester (MTP) is a library providing a framework for the 
 scritable functional testing of ASCII based line protocols.</p>
+<p>
+This contains a lightweight scripting framework suitable for the
+functional testing of the ASCII line based protocols common in mail.
+A script contains a list of client requests and templated server
+responses. The framework runs the client lines against a host system
+and then compares the server lines received in response against the
+template responses. 
+</p>
+</section>
+<section name='Using MPT'>
+<subsection name='Host System'>
+<p>
+MPT is a lightweight, flexible framework which is capable of being used
+in a variety of ways. <code>HostSystem</code> is pivotal, defining the 
+interface between the framework and the server system under test.
+</p>
+<ul>
+<li>
+The <code>ExternalHostSystem</code> implementation connects to a port on a server. 
+This is typically used to test a complete running server (including the sockets).
+<a href='../antlib'>MPT AntLib</a> provides an
+<a href='http://ant.apache.org' rel='tag'>Ant</a> task suitable for this use case.
+</li>
+<li>
+When performing in-JVM testing (without a live server socket) a custom implementation
+must be created connecting the framework to the components under test. This use case
+is typically developed as a <a href='http://www.junit.org'>JUnit</a> test case.
+</li>
+</ul>
+</subsection>
+<subsection name='With JUnit'>
+<p>
+In-JVM JUnit testing is a typical use case. The framework provides
+abstract superclasses which setup up appropriate fixtures. 
+</p>
+</subsection>
 </section>
 <section name="Script Features">
+<subsection name='Regex Matching Of Server Responses'>
+<p>
+The server responses in the script support regex matching.
+</p>
+</subsection>
 <subsection name='Variable Substitution'>
 <p>
 Variables of form <code>${<em>variable-name</em>}</code> may be substituted by values
@@ -40,4 +81,4 @@
 </subsection>
 </section>
 </body>
-</document>
+</document>
\ No newline at end of file

Propchange: james/protocol-tester/trunk/src/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Nov 29 04:39:30 2008
@@ -0,0 +1 @@
+.*

Copied: james/protocol-tester/trunk/src/site/site.xml (from r721650, james/protocol-tester/trunk/main/src/site/site.xml)
URL: http://svn.apache.org/viewvc/james/protocol-tester/trunk/src/site/site.xml?p2=james/protocol-tester/trunk/src/site/site.xml&p1=james/protocol-tester/trunk/main/src/site/site.xml&r1=721650&r2=721673&rev=721673&view=diff
==============================================================================
--- james/protocol-tester/trunk/main/src/site/site.xml (original)
+++ james/protocol-tester/trunk/src/site/site.xml Sat Nov 29 04:39:30 2008
@@ -34,13 +34,8 @@
 
     <menu name="Mail Protocol Tester">
       <item name="Overview" href="index.html"/>
-      <item 
-      	name="DOAP" 
-      	href="doap_mailet.rdf" 
-      	img='http://www.w3.org/RDF/icons/rdf_metadata_button.32'/>
     </menu>
     
-    <menu ref="reports" />
-
+    <menu ref="modules" />
   </body>
 </project>

Propchange: james/protocol-tester/trunk/src/site/site.xml
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: james/protocol-tester/trunk/src/site/xdoc/index.xml (from r721659, james/protocol-tester/trunk/main/src/site/xdoc/index.xml)
URL: http://svn.apache.org/viewvc/james/protocol-tester/trunk/src/site/xdoc/index.xml?p2=james/protocol-tester/trunk/src/site/xdoc/index.xml&p1=james/protocol-tester/trunk/main/src/site/xdoc/index.xml&r1=721659&r2=721673&rev=721673&view=diff
==============================================================================
--- james/protocol-tester/trunk/main/src/site/xdoc/index.xml (original)
+++ james/protocol-tester/trunk/src/site/xdoc/index.xml Sat Nov 29 04:39:30 2008
@@ -28,16 +28,36 @@
 <body>
 <section name="What is the Apache James MTP?">
 <p>
-Apache James Mail Protocol Tester (MTP) is a library providing a framework for the 
+Apache James Mail Protocol Tester (MTP) is  a framework for the 
 scritable functional testing of ASCII based line protocols.</p>
-</section>
-<section name="Script Features">
-<subsection name='Variable Substitution'>
+<subsection name='Modules'>
 <p>
-Variables of form <code>${<em>variable-name</em>}</code> may be substituted by values
-passed into the script builder before interpretation.
+The <a href='main'>main library</a> contains the basic frameworks suitable
+for creating <a href='http://www.junit.org' rel='tag'>JUnit</a> tests and
+for creating standalone tests suitable for independent execution. This contains 
+a lightweight scripting framework suitable for the
+functional testing of the ASCII line based protocols common in mail.
+The script contains a list of client sends and templated server
+responses. The framework runs the client lines against a host system
+and then compares the server lines received in response against the
+templates (which may include regex's and so on).
+</p><p>
+The <a href='antlib'>AntLib</a> module extends the standalone framework
+to create functional testing tasks suitable for execution against a 
+indepedently running server.
 </p>
 </subsection>
 </section>
+<section name='More Information'>
+<p>For more information on</p>
+<ul>
+<li>Scripting Language</li>
+<li>Hosts Setup</li>
+<li>Running Tests</li>
+</ul>
+<p>
+See the <a href='main'>documentation</a> for the main MPT library.
+</p>
+</section>
 </body>
 </document>

Propchange: james/protocol-tester/trunk/src/site/xdoc/index.xml
------------------------------------------------------------------------------
    svn:mergeinfo = 



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org