directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny" <>
Subject Using JUnit 4 in tests
Date Tue, 25 Sep 2007 21:54:41 GMT
Hi !

I have done some experiment in trunks with JUnit4. The results are
impressive ! For SearchTest, I went from 40 seconds down to 4 seconds.

The basic idea is to setup the server only once per class, instead of
set up and shutdown the server for each test.

The price to pay is not free though : the data must be organized in a
way that the initial import of entry covers all the test. These data
will be imported before each tests, we can also think about deleting
them after each test.

Here are the three classes implemented as a example.


Just tell me if you need any more explanations.

I would like to switch the most costly unit tests using this technic
as quickly as possible, to reduce the global regrssion tests cost
(more than 20 minutes on my laptop). I really think we can go down to
4 or 5 minutes.
The targets are core-unit and server-unit.

Thanks !

PS: currently, fast and slow tests are overlapping. I will wait a bit
before commenting slow tests.

Emmanuel L├ęcharny

View raw message