maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David C. Hicks" <dhi...@i-hicks.org>
Subject Re: Functional Test strategies with Maven
Date Mon, 02 Mar 2009 17:06:48 GMT
Martijn - I've seen this done a couple of different ways.  I can't say 
that there is any particular set of advantages/disadvantages that makes 
one more attractive than another.  I'm sure you've already thought about 
these, but here they are, just the same:

#1 - The functional tests are named with a specific suffix (ex. _FT) so 
that they can be included/excluded by profile.  They still live in the 
src/test/java tree alongside the unit tests.  In this case, you must 
explicitly include and/or exclude tests based on a pattern matching 
their class names.

#2 - Place all of your functional tests in a different source tree (ex. 
src/functionalTest/java).  As with #1, you have to do some 
include/exclude type work, but in this case, you only have to do so on 
your profile that runs the functional tests.  However, you also have to 
make sure to include this tree on your compilation.

So, IMHO, there's no clear winner.  I've been dealing with similar 
problems lately for Integration Tests that actually start up my web app 
and test it using Selenium.  I have the same set of problems.  I think I 
read that there are plans to enhance Maven with the knowledge of 
functional/integration tests, but I don't know what the timing for any 
such change is.

Dave

>> The specific purpose in this case is to ensure that we've wired up
>> messaging flow(s) within our module. This is done by sending a mocked event
>> through the various routers/transformers etc that we have. They're not unit
>> tests because they're not testing a discrete bit of functionality within a
>> Java class.
>>
>> However, it is vital that these tests pass before we package that module,
>> so I we want to run them as part of a the test life-cycle (as opposed to
>> integration-test which is post package) or at least a life-cycle phase that
>> is before package.
>>
>> I agree that we could use profiles to run this group of tests separately,
>> but I'd like to understand where they should live in the source structure.
>> All of the Maven literature that I have read talks of <module
>> name>-->test-->src-->java being used for unit tests, but tests such as
mine
>> fall into a grey area?
>>     


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message