> I will handle this special case (if I can). But my question is more > general: What makes a Test an ITest? Is there any guideline? For instance: > * If it takes longer than x seconds > * If starting the server in an embedded way is necessary > * If the network layer is used by the test > * ... > ?
Well, this is all about semantic :) Itests are supposed to be integration test. I'm not sure there is a big difference between 'normal' tests and integration tests, except that when you do a mvn install, only 'normal' tests are executed (which is cool, when you consider that Integration tests last for 20 minutes !!!) Otherwise, core-unit use an embedded server, and server-unit use a remote server. May be aex can bring some more info about integration tests ? > Why do we still need the old tests in the slow fashion? We don't if we are 100% sure that new tests cover the exact same tests than the slow ones. If tis is this case, then we can ditch slow tests :) I thought > migrating existing tests to your new base class (AbstractServerFastTest) > is a very good idea, if we can guarantee that the behavior is > equivalent. That is the question :) I have already done this for ModifyRdnTest and > ModifyRemoveTest. Both were not tagged as ITest in their name before, > although they probably should have been (see above)?. Now they are > dramatically faster, due to JUnit 4 and your BeforeClass feature. Oh yes ! Wehneach previous tests cost around 2 secondes per test, we have a global cost of 2 seconds. For instance, Search tests cost 40 seconds with the previous method, and only 6 seconds now... fast ! > > Maybe there are some tests in server-unit, which can't be converted to > AbstractServerFastTest, because they need a totally different setup ... yes. I think that a global migration is necessary, but it will take around 2 weeks. However, if the gain is 16 minutes out of 20 each time we run the integ tests, this will save us a lot of time and also will allow us to run integ tests more often before committing ;) -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
