Thom
Thom

Reputation: 15042

Speed up junit tests in ant build

I was watching our ant build run the other day and noticed that most of our junit tests run < 0.2 seconds but it takes ant 1-2 seconds to cycle between them. This is probably the single greatest block of time in our typical build.

So I was wondering if I created a test suite, would that help remove the overhead time for each test and just spend the overhead one time for a whole block of tests? Also, does anyone else have a better idea?

Upvotes: 5

Views: 976

Answers (1)

Thom
Thom

Reputation: 15042

I had placed fork="yes" on our junit tests to solve some problem we were having ages ago. I can't remember what it was, but I just tried switching it to forkmode="once" on Clemens advice and it cut three minutes from our build time.

Thanks for all the help.

Upvotes: 3

Related Questions