db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mahler Thomas <thomas.mah...@itellium.com>
Subject RE: Question about unit test
Date Wed, 09 Apr 2003 08:26:18 GMT
Hi Torsten,

> Dear list,
> I had a look at the unit test piece of OJB for the first time 
> today and just
> asked myself two questions:
> - For someone who thinks of joining the OJB developer 
> community is there any
> introductory document on how to use the unit test and how to 
> make sure the
> test one runs are meaningful at all?

No we don't have such a document yet.
running the junit tests can be done by executing the ant target junit.
If you want to run the junit test frequently (say after minor changes to the
code) you can first setup up the testbed with the target prepare-tutorials
and then run the junit test with the target junit-quick. This will avoid
time expensive rebuild of the testbed.

There is no easy answer how to make junit tests meaningful. You will find
some tutorials and cookbooks at http://www.junit.org. But of course they are
not specific to OJB.
If you have a look at the existing junit tests you will see what we are
doing. There are sometimes even comments that explain why tests look that

A good example is the lockmanagement testsuite. The expected semantics is
documented here: http://db.apache.org/ojb/lockmanager.html
It contains a table of locking scenarios. This table constains the name of
the respective testcase. The respective testcases can then be found as
testcases test.ojb.odmg.LockTestXXX.

> - Bear with me if I overlooked that but how would I test 
> features that are
> platform specific. 

We don't have platform specific testcases. Before building a release I'm
running the junit tests against HSQLDB only.

> For example, I did not find anything about platform
> specific options in the table generation script.

The table generation scripts are done with Torque. We don't have testcases
for Torque. I assume the Torque does there own testing!

If you want to test OJB against a specif platform you set the according
switches in build.properties, make the entries in the platform profile file
point to the database in use and run it. So there are no separate junit
tests for specific platforms.


> Torsten
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org

View raw message