db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Myrna van Lunteren <m.v.lunte...@gmail.com>
Subject Re: Features of the JUnit test execution harness
Date Tue, 31 Jan 2006 21:39:46 GMT
On 1/24/06, Kristian Waagan <Kristian.Waagan@sun.com> wrote:
> >>>Kristian Waagan wrote:
> >>>4) Should it be possible to run single JUnit test/suite from the
> >>>command line

>><2 yeahs snipped, 3rd: (Dan:)>
>> I think it's essential that a single test can be run. I don't think it's
>> essential that it is from test's main method. The harness produces the
>> useful functionality of setting up the correct environment for the test,
>> not sure if that could be duplicated in evey main method for every test.

>Good point Dan.

>Citing Dan: "...harness produces the useful functionality of setting up
>the correct environment for the test,...".

>Can somebody please explain to me what is actually done by the harness?

>I did have a quick look at the harness code, but I would need to study
>it a bit more to understand what it actually does. Stating what the
>harness does when it comes to setting up the environment for tests would
>be good for the general understanding of the test execution process.

I've had this messages 'starred' in gmail for a bit, sorry for replying only
now. There's no quick way to describe what the 'functiontest' harness does -
I've tried to describe what I understand in the past (see the

Maybe if you have specific questions I'll be able to answer better.

The main thing I think that the functiontest harness does is set up all
sorts of fun properties for the tests to use, so the same test can run in a
number of different ways - in a suite, by itself, with different encryption
algorithms, with encoding, locales, frameworks, with
java.sql.DriverManageror instead with DataSource; to run in sequence
or separately, start a new
database or not...Depending on these properties, more or less 'magic' is
done - for example, network server gets started or not, files needed for the
test get copied around...
Properties in a suite override properties set for individual tests lower
Also, it is able to figure out what jvm is used and add specific
(non-standard) properties as needed or applicable.

A big part of it is to control, and eliminate uninteresting differences in
the output, but that would be irrelevant with Junit, yes?

Does this help at all?
But maybe that wasn't what Dan meant?


View raw message