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. directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/FastDelITest.java directory/apacheds/trunk/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerFastTest.java directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/FastSearchTest.java 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. -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
