« Return to Thread: 'test/java' and 'test/groovy' directories

Re: 'test/java' and 'test/groovy' directories

by Peter Ledbrook :: Rate this Message:

Reply to Author | View in Thread

On 12/01/2008, Marcos Silva Pereira <marcos.silva@...> wrote:
> Hum... I don't write unit test for Java classes using Java. Indeed, use
> groovy to write these test sounds more attractive to me. Moreover, test can
> be grouped by packages, so, why divide them in more directories?

Urgh...tests in a different package? Sorry, one of my pet hates :)
Anyway, the point is that in some build systems it is useful to have
different classpaths for the main source and the tests. Grails only
adds 'test/unit' and 'test/integration' when running the tests
(understandably).

However, there are no other paths defined explicitly for tests, so the
only option is to put helper/abstract classes under either 'test/unit'
or 'test/integration'. In addition, plugins cannot provide 'test-time'
source files. So, it would be nice to have something similar to
Maven's standard structure, i.e. 'test/groovy' and 'test/java' where
you can put classes that only apply for tests (and shouldn't be
distributed in the WAR file).

Probably clear as mud, but I hope it clarifies the intention behind
the proposal :)

Cheers,

Peter

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

 « Return to Thread: 'test/java' and 'test/groovy' directories