- jWebUnit Compile Test for Used Packages
- Description
- Checking Out a jWebUnit Developer Version Using CVS
- Inspection of jar Libraries
- Test Compiling and Creating jWebUnit jar Library Using Original Libs
- Test Compiling and Creating jWebUnit jar Library Using New Libs 1
- Test Compiling and Creating jWebUnit jar Library Using New Libs 2
- Summary
jWebUnit Compile Test for Used Packages
Description
jWebUnit is a Java framework that facilitates creation of acceptance tests for web applications, and is considered to be used for testing in the Proteios 2 project. Differences between the versions of packages needed for jWebUnit as given on the jWebUnit dependencies page http://jwebunit.sourceforge.net/dependencies.html, and the latest version of each package according to information on the package's web site, are described in jWebUnit Package Dependencies for Latest Releases. This note describes tests to compile the jWebUnit jar library jwebunit-1.2.jar using updated versions of the third-party package files.
The test described was performed 2006-03-06.
Checking Out a jWebUnit Developer Version Using CVS
A developer version of jWebUnit was checked out using CVS into a new directory (anonymous cvs access, password = <Enter>):
cd jwebunit_cvs_copy
cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/jwebunit login
cvs -z3 -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/jwebunit co jWebUnit
Inspection of jar Libraries
| Library Name | Version specified in dependencies.html | Latest stable version | Version used in cvs copy | Not included in dependencies.html |
| JUnit | 3.8.1 | 4.0 | 3.8.1 | |
| HttpUnit | 1.5.4 | 1.6.1 | 1.6.1-20060101 | |
| Apache XML API | 1.0.b2 | 1.3 (1.3.2) | 1.0.b2 | |
| Rhino (js.jar) | 1.5R4.1 | 1.6R2 | 1.6R2 | |
| nekoHTML | 0.8.1 | 0.9.5 | 0.9.5 | |
| Xerces XML pars. | 2.6.2 | 2.8.0 | 2.6.2 | |
| Jetty | 4.2.20 | 5.1.10 | 4.2.20 | |
| Servlet API | 2.3 | 2.4 | 2.3 | |
| Jasper-compiler | 4.1.30 | 5.5.15 | 4.1.30 | |
| Jasper-runtime | 4.1.30 | 5.5.15 | 4.1.30 | |
| jacobie-1.3.jar | - | ? | 1.3 | Not included |
| jacob.jar | - | ? | ? | Not included |
| regexp-1.3.jar | - | ? | 1.3 | Not included |
Table 1.
Test Compiling and Creating jWebUnit jar Library Using Original Libs
Using the original jar-libraries in Table 1, column 4, ant was used to compile and create jwebunit.jar in "dist" directory:
- ant compile
- ant make-zip
Build successful, dist/jwebunit-1.2.jar (56158 bytes) created. Copy of dist/jwebunit-1.2.jar saved outside dist directory as "jwebunit-1.2_orig_20060306_0809.jar".
Test Compiling and Creating jWebUnit jar Library Using New Libs 1
Of the three libraries that had been updated in the cvs version relative to specifications in dependencies.html (HttpUnit, Rhino, and nekoHTML), the two latter were kept, as the jar-file sizes were identical to the ones copied from their web sites. File httpunit-1.6.1-20060101.jar (file date 2005-12-29) had a size of 407373 bytes, compared to 405852 bytes for httpunit-1.6.1.jar copied from sourceforge.net 2006-03-03. This jar-file was therefore updated.
With the other updated jar-files, the compile test 1 set-up was according to Table 2, column 4:
| Library Name | Version specified in dependencies.html | Latest stable version | Version used for test 1 (*: new file) | Not included in dependencies.html |
| JUnit | 3.8.1 | 4.0 | 4.0 * | |
| HttpUnit | 1.5.4 | 1.6.1 | 1.6.1 * | |
| Apache XML API | 1.0.b2 | 1.3 (1.3.2) | 1.3.03 * | |
| Rhino (js.jar) | 1.5R4.1 | 1.6R2 | 1.6R2 | |
| nekoHTML | 0.8.1 | 0.9.5 | 0.9.5 | |
| Xerces XML pars. | 2.6.2 | 2.8.0 | 2.8.0 * | |
| Jetty | 4.2.20 | 5.1.10 | 5.1.10 * | |
| Servlet API | 2.3 | 2.4 | 2.4 * | |
| Jasper-compiler | 4.1.30 | 5.5.15 | 5.1.15 * | |
| Jasper-runtime | 4.1.30 | 5.5.15 | 5.1.15 * | |
| jacobie-1.3.jar | - | ? | 1.3 | Not included |
| jacob.jar | - | ? | ? | Not included |
| regexp-1.3.jar | - | ? | 1.3 | Not included |
Table 2.
Using new jar-libraries in Table 2, column 4, ant was used to compile and create jwebunit.jar in "dist" directory:
- ant clean
- rm dist/*
- ant compile
- ant make-zip
Build failed, with error message (shortened to remove local installation directory name):
.. /jWebUnit/test/net/sourceforge/jwebunit/util/JettySetup.java:51
unreported exception java.lang.Exception; must be caught or
declared to be thrown
[javac] jettyServer.start();
[javac] ^
[javac]
[javac] 1 error
Test Compiling and Creating jWebUnit jar Library Using New Libs 2
Using the original library "org.mortbay.jetty-4.2.20.jar" instead of "org.mortbay.jetty-5.1.10.jar", the compile test 2 set-up was according to Table 3, column 4:
| Library Name | Version specified in dependencies.html | Latest stable version | Version used for test 2 (*: new file) | Not included in dependencies.html |
| JUnit | 3.8.1 | 4.0 | 4.0 * | |
| HttpUnit | 1.5.4 | 1.6.1 | 1.6.1 * | |
| Apache XML API | 1.0.b2 | 1.3 (1.3.2) | 1.3.03 * | |
| Rhino (js.jar) | 1.5R4.1 | 1.6R2 | 1.6R2 | |
| nekoHTML | 0.8.1 | 0.9.5 | 0.9.5 | |
| Xerces XML pars. | 2.6.2 | 2.8.0 | 2.8.0 * | |
| Jetty | 4.2.20 | 5.1.10 | 4.2.20 | |
| Servlet API | 2.3 | 2.4 | 2.4 * | |
| Jasper-compiler | 4.1.30 | 5.5.15 | 5.1.15 * | |
| Jasper-runtime | 4.1.30 | 5.5.15 | 5.1.15 * | |
| jacobie-1.3.jar | - | ? | 1.3 | Not included |
| jacob.jar | - | ? | ? | Not included |
| regexp-1.3.jar | - | ? | 1.3 | Not included |
Table 3.
Using new jar-libraries in Table 3, column 4, ant was used to compile and create jwebunit.jar in "dist" directory:
- ant clean
- rm dist/*
- ant compile
- ant make-zip
Build successful, dist/jwebunit-1.2.jar (56158 bytes) created. Copy of dist/jwebunit-1.2.jar saved outside dist directory as "jwebunit-1.2_lib_dir_new_02_20060306_0912.jar".
Summary
The file size of the "jwebunit-1.2.jar" compiled with the updated jar packages in Table 3 is identical to the one compiled with the original packages in Table 1. This indicates that several of the included jar packages only are used at run-time. No run-time tests have been performed at the time of writing.
