On Mon, Aug 15, 2016 at 8:52 AM, Richard W. Adams <rwada...@up.com> wrote:

> Can someone clarify how to separate unit & integration tests in the Maven
> standard directory layout? The documentation says to use src/test/java for
> "test source," but src/it for "integration tests (primarily) for plugins."
>
> Does that mean we should use src/it only when developing a plugin?
>

It does not mean that.



> Are normal integration tests grouped with unit tests under src/test/java?
> If so, how does Failsafe know which tests to run for the verify goal? That
> is, how does Failsafe distinguish between unit & integration tests if
> they're under the same directory?
>

You have some options...
1. Put the integration tests in a separate module (my preferred approach)
2. Configure Surefire and Failsafe to use respective file name endings,
e.g. *Test and *IT and comingle tests (not a helpful approach)
3. Configure Failsafe to use src/it/java for integration tests (use this to
keep ITs in same module).

Reply via email to