maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aslak Knutsen (JIRA)" <j...@codehaus.org>
Subject [jira] (SUREFIRE-762) Add support for test compile and test runtime separation
Date Sun, 04 Jan 2015 14:43:10 GMT

    [ https://jira.codehaus.org/browse/SUREFIRE-762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=360606#comment-360606
] 

Aslak Knutsen commented on SUREFIRE-762:
----------------------------------------

Yes, this is still relevant. 

Different dependencies in a profile serves a different purpose and require re-execution of
the maven process. Allowing Surefire to resolve multiple classpaths in different surefire
executions opens for the option to test multiple different API implementations in one Maven
execution. 

Currently to test multiple different classpaths resolved in one maven execution you would
need to use multiple modules, e.g. core, core-test-junit4, core-test-junit4.2, core-test-junit4.3
etc...When all you really need is to swap the junit version and run all tests multiple times.


This patch/issue opens up for a test-runtime 'scope' per surefire execution, a scope that
is currently missing in Maven. 



> Add support for test compile and test runtime separation
> --------------------------------------------------------
>
>                 Key: SUREFIRE-762
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-762
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.9
>            Reporter: Aslak Knutsen
>            Assignee: Tibor Digana
>         Attachments: SUREFIRE-762
>
>
> In some cases it is interesting to bind surefire to multiple execution targets but have
it operate on different classpaths. 
> e.g:
> - Have the same test suite run against multiple JPA providers; EclipseLink and Hibernate
> - Arquillian test suite run against Tomcat and Jetty
> In these cases you would have the TestCompile scope defined in your normal dependency
chain scoped as "test", while you can tell surefire to activate another profile during test.
> TestCompile = JPA API
> TestRuntime = Hibernate | EclipseLink
> Example:
> https://gist.github.com/1155271



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Mime
View raw message