Hi, On 11/03/16 13:56, "Bertrand Delacretaz" <[email protected]> wrote:
>Hi, > >On Fri, Mar 11, 2016 at 1:46 PM, Stefan Egli <[email protected]> >wrote: >> ...But short term, I think we could exclude them and put them in a >>separate >> integration tests category... > >As I said I don't want to exclude all integration tests by default, we >need to be more granular. > >A cheap way of marking those tests as slow is to move them so that >their Java package name includes the word "slow" with dots around it. > >We can then configure the testing plugins to ignore such tests by >default, this should work regardless of which version of JUnit or the >plugins is used (to be verified). > >That's assuming those tests work if moved to different packages, >otherwise we might define a class naming convention like FooTestSlow >and FooITSlow instead, but that's a bit uglier. Alternatively we could use the @Category junit annotation and exclude them by default via an 'excludedGroups' via surefire (and include them in the integration test phase) as described in [0] and [1]? (Or we could perhaps even introduce our own annotation..) Cheers, Stefan -- [0] http://stackoverflow.com/questions/14132174/how-to-exclude-all-junit4-tests -with-a-given-category-using-maven-surefire [1] http://www.agile-engineering.net/2012/04/unit-and-integration-tests-with-ma ven.html
