Building and running Cactus Enhydra sample application

  1.  Preparing the build
  1. Building

                ant clean

                ant

  1. Run/Test using ant

                ant test_all

        or

                ant -f buildTEST.xml

        These commands are equivalent, and should show  yield somthing like:

[junit] Running org.hamletsoft.enhydra.cactus.business.sample.SampleEnhydraAppTestCase
[junit] Tests run: 7, Failures: 0, Errors: 0, Time elapsed: 0.828 sec
[junit] Running org.hamletsoft.enhydra.cactus.business.sample.SampleEnhydraRedirectionTestCase
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.578 sec

  1. Run/Test from your browser

            ant -f buildTEST.xml start_enhydra

            http://localhost:9000/EnhydraTestRunner.po?suite=org.hamletsoft.enhydra.cactus.business.sample.SampleEnhydraAppTestCase

            or

            http://localhost:9000/EnhydraTestRunner.po?suite=org.hamletsoft.enhydra.cactus.business.sample.SampleEnhydraRedirectionTestCase

            You should get a response similar to:

  <?xml version="1.0" encoding="UTF-8" ?>
- <testsuites>
- <testsuite name="org.hamletsoft.enhydra.cactus.business.sample.SampleEnhydraAppTestCase" tests="7" failures="0" errors="0" time="0.781">
  <testcase name="testReadOutputStream" time="0.375" />
  <testcase name="testPostMethod" time="0.062" />
  <testcase name="testGetMethod" time="0.047" />
  <testcase name="testSendParams" time="0.047" />
  <testcase name="testSendHeader" time="0.031" />
  <testcase name="testSendCookie" time="0.047" />
  <testcase name="testBasicAuthentication" time="0.047" />
  </testsuite>
  </testsuites>

and (respectively):

  <?xml version="1.0" encoding="UTF-8" ?>
- <testsuites>
- <testsuite name="org.hamletsoft.enhydra.cactus.business.sample.SampleEnhydraRedirectionTestCase" tests="2" failures="0" errors="0" time="0.11">
  <testcase name="testRedirection1" time="0.047" />
  <testcase name="testRedirection2" time="0.063" />
  </testsuite>
  </testsuites>

If you prefer the HTML format, just add

   &xsl=junit-noframes.xsl

at the end of the above URLs, e.g.:

http://localhost:9000/EnhydraTestRunner.po?suite=org.hamletsoft.enhydra.cactus.business.sample.SampleEnhydraRedirectionTestCase&xsl=junit-noframes.xsl

and

http://localhost:9000/EnhydraTestRunner.po?suite=org.hamletsoft.enhydra.cactus.business.sample.SampleEnhydraRedirectionTestCase&xsl=junit-noframes.xsl