JUnit makes doing regression testing simple -- at the high and low level.
That's what we use on our (500+ file) project. It's a very easy and
flexible framework; and with the PerlUtilties from Jakarta, you have all the
power of Perl in a much clearer and powerful environment.
I'll convert PatternTest to a JUnit test as an example. It may take a
while, though -- not because creating the new tests will be hard, but
because PatternTest is spread across many different files in three different
languages (and I barely speak "shell") with lots of things relying on
side-effects; so deciphering it will take time. Besides, I do have a "real"
job... :)
-Jim Moore
-----Original Message-----
From: Ceki Gulcu [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 18, 2001 11:51 AM
To: LOG4J Developers Mailing List
Subject: RE: Plan for release 1.2
At 10:05 18.06.2001 -0500, Jim Moore wrote:
>"Contributors are expected to be familiar with the log4j test environment.
>They are also required to add a new test case with each new feature or
>component."
>
>What is the test environment? In the org.apache.log4j.test package, there
>are "ad-hoc" tests (like PatternTest) and JUnit tests (like
>UnitTestCategory). Do we add unit tests to the "unitTest" script?
Wouldn't
>it make more sense to add them to a TestSuite to use JUnit's built-in
>support? Also, shouldn't the ant declaration have a "test.all" task so
it's
>not platform dependant (ie, "#!/bin/sh") and more easily done as part of
the
>regular build process? Am I missing something fundimental, or do we simply
>need a more defined "test environment"?
>
>-Jim Moore
Hi Jim,
The test environment is the code and scripts that are under
org.apache.log4j.test
and org.apache.log4j.xml.test. These contain shell scripts as well as JUnit
unit tests plus a few perl scripts.
I started writing the bash scripts long before JUnit was fashionable. The
log4j test suite has been verified to run on both Windows NT/2000 and Linux.
The log4j test scripts require the bash shell and perl. On most Unix systems
these are included by default. On Windows systems you need to install the
Cygwin tools from
http://sources.redhat.com/cygwin
The JUnit-based tests are useful for testing small components whereas the
bash scripts do regression tests at a higher level, i.e. they compare the
output of the tested code against witness output. In some cases, the test
code took more time to write than the code being tested. I would not any
shed tears if we could get rid of the bash/perl scripts. However, I am not
sure JUnit is suitable for regression testing. Is it? Your comments and
suggestions are welcome. Ceki
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]