maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Wheeler <>
Subject Re: maven-failsafe-plugin: what is it actually intended for?
Date Wed, 13 Nov 2013 16:39:47 GMT
On 13/11/2013 11:16 AM, Matthew Adams wrote:
> I don't think timing should be the heuristic here.  The fact that unit
> tests take less is a result of the fact that what you're testing, aka the
> "unit", tends to be small.  After all, a unit test should test a "unit".
So what is your definition?
> An integration test, then, if I were defining it strictly, would be
> anything that's not a unit test.  In practice, this usually means replacing
> any mocks and/or stubs in your unit tests with the real implementations,
> plus using any other supporting infrastructure, like databases, dependency
> injection contexts, etc.
Not sure that this is true for all integration tests. You may be able to 
test the integration of two projects (a web service and a database 
access layer) while still using mocks and stubs (mock of a database 
persistence layer).
People frequently test with Jetty when the final project will run on Tomcat.
It all depends on what part of the system integration is being tested.

> HTH.
> -matthew
> On Wed, Nov 13, 2013 at 9:59 AM, Stephen Connolly <
>> wrote:
>> On 13 November 2013 15:20, James Green <> wrote:
>>> I love the FAQ entry that states that it is intended for running
>>> integration tests.
>>> The next entry should read: What do you call an integration test?
>> Any test that takes more than 1 second to run is *not* a unit test.
>> Most tests that take more than 50ms to run are *not* unit tests... but
>> there can be some exceptions
>> If a unit test needs to call out to other systems, it will typically use a
>> mock.
>> If your test is actually calling out to other systems (which could be code
>> from a dependency, etc - i.e. not just a TCP socket, could be a call within
>> JVM) then it is testing the integration of those two parts... therefore it
>> is not a unit test.
>> There is no hard and fast rule as to where the transition occurs... but we
>> know that tests who's execution time is greater than 1 second are not unit
>> tests... and hence are integration tests...
>> HTH
>>> I've asked around and no-one comes up with a consistent answer. I guess
>> it
>>> depends on what is executing the integration test. In this case maven is
>>> invoking someone after the packaging phase so should I expect to run
>> tests
>>> against the packaged binary artefact? Is that the purpose here?
>>> Thanks,
>>> James

Ron Wheeler
Artifact Software Inc
skype: ronaldmwheeler
phone: 866-970-2435, ext 102

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message