> -----Original Message-----
> From: Kenney Westerhof [mailto:[EMAIL PROTECTED]
> Sent: lundi 31 octobre 2005 17:17
> To: Maven Developers List
> Subject: RE: Packaging type for functional/integration test projects?
[snip]
> Sorry, my mistake. I meant src/it/[project]/.
>
> > that there are 2 types of sources:
> > - the one that will be packaged and executed at runtime. They go in
> src/main
> > - the one that are tests (any kind of test and test resources). They go
> in
> > src/test.
>
> Yes.
>
> > Thus for example:
> >
> > src/test
> > |_ java (unit tests)
> > |_ it (or integration or functional for functional tests)
>
> I believe functional tests fall in another category dimension.
> We have 2 axes:
>
> Unit test --------- Integration Test,
>
> and orthogonally to that:
>
> Basic test --------- Functional test
>
> Unit/integration test depends on wheter sub-components of a project,
> or the entire project, possibly in a larger 'environment' is being tested.
> Basic/Functional test is internal/external api testing. At least that's
> what I've come to understand at my last job. :)
>
> > |_ groovy (for groovy tests)
> > |_ cactus (for cactus tests)
> > |_ resources (for tests resources)
> > |_ resources-it (for it test resources - for example)
>
> I don't think we should separate sources depending on testing framework.
> Since they have to be defined in the pom anyway (the plugins for that),
> you can just use src/test/ or src/it for that, and if you need multiple
> tests (are they guaranteed to work on different source sets?) you can
> always manually add directories...
What is sure is that the m2 testing strategy is a real mess.
I think we have several options:
Solution 1:
============
Decide that we do not mix unit and integration/functional tests in the same
maven project. In that case, we can have a simply directory structure:
src/test/
|_ java/
|_ resources/
Which will work both for unit, integration/functional tests.
<side note>I don't think we need to differentiate integration and functional
tests</side note>
So the best practice would be to tell users that if they have
integration/functional tests they should put them in a separate subproject.
In any case this is almost always the case for functional tests because they
require some running environment.
Solution 2:
============
Try to cope with all possible situation and have a more complex directory
structure so that users can have unit tests alongside integration/functional
tests in the same project.
That would lead to something like:
A)
src/test/
|_ unit/
|_ junit/
|_ resources-junit/
|_ groovy/
|_ resources-groovy/
|_ [...]
|_ integration/
|_ cactus/
|_ [...]
|_ functional/
Or
B)
src/test/
|_ unit/
|_ java/
|_ resources/
|_ integration/ or functional/ (or both)
|_ java/
|_ resources/
That would mean that wouldn't mix tests written using different tools and
belong to the same testing category (unit, integration, functional) in the
same project. That should be ok though. A separate project would be required
if needed.
However I personally still don't like src/it as it *are* tests and this you
cannot have src/test and src/it as directory siblings.
[snip]
> > I still don't understand why you want to have src/it.
>
> Integration tests! Multiple possible projects to run the code of the
> 'main' project (including runtime dependencies) against. Say,
> maven-core-it/it*/ -> src/it/*, and for the maven-eclipse-plugin:
> src/test/projects/project-X -> src/itest/project-X and drop src/test/.
It seems you're not talking about integration tests but about integration
test resources. I would put them in src/integration/resources (see option B
above).
[snip]
I'll provide more feedback to your other questions when I have progressed
more on my cargo m2 tests.
Thanks
-Vincent
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]