commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject cvs commit: jakarta-commons-sandbox/jelly/xdocs jellyunit.xml navigation.xml
Date Mon, 22 Jul 2002 08:00:36 GMT
jstrachan    2002/07/22 01:00:36

  Modified:    jelly/xdocs navigation.xml
  Added:       jelly/xdocs jellyunit.xml
  Added some initial documentation of the JellyUnit features and the JUnit library in Jelly
  Revision  Changes    Path
  1.8       +1 -0      jakarta-commons-sandbox/jelly/xdocs/navigation.xml
  Index: navigation.xml
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/xdocs/navigation.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- navigation.xml	18 Jul 2002 14:15:13 -0000	1.7
  +++ navigation.xml	22 Jul 2002 08:00:36 -0000	1.8
  @@ -9,6 +9,7 @@
         <item name="Overview"                href="/index.html"/>
         <item name="FAQ"                     href="/faq.html"/>
         <item name="Detail"                  href="/overview.html"/>
  +      <item name="JellyUnit"               href="/jellyunit.html"/>
         <item name="Tag Reference"           href="/tags.html"/>
         <item name="Download"                href="/dist/"/>
         <item name="To Do List"              href="/todo.html"/>
  1.1                  jakarta-commons-sandbox/jelly/xdocs/jellyunit.xml
  Index: jellyunit.xml
  <?xml version="1.0"?>
      <author email="">James Strachan</author>
      <section name="JellyUnit"> 
          JellyUnit is a Jelly based JUnit testing mechanism. 
          This allows Jelly scripts to be used to perform unit testing which can be particularly
          if you wish to test XML, XPath, SQL, HTTP, JMS or SOAP interactions.
          JellyUnit works by using the <a href="tags.html#jelly:junit">JUnit library
</a> in a Jelly script
          to create JUnit TestSuite and TestCase objects. 
          There are all the usual JUnit assertion tests available such as &lt;assert&gt;

          &lt;assertEquals&gt; and &lt;fail&gt;. You can use both Jexl and
XPath expressions in the 
          &lt;assert&gt; tag via either the <i>test</i> or the <i>xpath</i>
          Inside these test scripts you can use the full range of Jelly tags such as navigating
          XML test data creating multiple test cases based on sample data, performing SQL
operations, SOAP calls, 
          HTTP or JMS requests etc. 
          You can also use Ant FileSets and the &lt;fileScanner&gt; tag to iterate
over collections of 
          Jelly scripts or XML data files and use this data to define new test cases.
      <section name="Integration with TestRunners"> 
          To integrate cleanly inside JUnit TestRunner frameworks there is a helper class,
          <a href="apidocs/org/apache/commons/jelly/tags/junit/JellyTestSuite.html">JellyTestSuite</a>
          which you can derive from
          to produce a single Java class which has a static <i>suite()</i> method
to create a TestSuite object 
          containing all the test cases created by the JellyUnit files.
  		There is an 
          <a href=";content-type=text/vnd.viewcvs-markup">example</a>
          of this in action.
        <p>So if you had a test suite defined in a jelly script <a>suite.jelly</a>
in a package
        	then you could create a class, capable of being ran inside any JUnit test runner
framework as follows
  import junit.framework.TestSuite;
  import org.apache.commons.jelly.tags.junit.JellyTestSuite;
   * A helper class to run jelly test cases in a JUnit TestRunner
  public class TestFoo extends JellyTestSuite {
      public static TestSuite suite() throws Exception {
          return createTestSuite(TestFoo.class, "suite.jelly");        

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message