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

Stephen Colebourne commented on SUREFIRE-569:
---------------------------------------------

Having spent the best part of a day trying to workaround this, I can't 
emphasise enough how much this is needed. Being able to produce a jar of test 
classes without being able to run them in a separate project is basically just 
a bug.

The patch could do with an enhancement, which is to pickup all jar files of 
type "test-jar", rather than having to name each individually, but I'd take the 
basic patch right now.

If you search the web, you'll see lots of people want to be able to test 
outside the original project.
http://softwaremavens.blogspot.co.uk/2009/09/running-tests-from-maven-test-jar-in.html
http://dharshanaw.blogspot.co.uk/2012/10/how-to-execute-testng-tests-in-side.html
http://stackoverflow.com/questions/3543473/run-maven-tests-from-classpath
http://stackoverflow.com/questions/13859737/run-testng-on-a-maven-test-dependency
http://stackoverflow.com/questions/11331518/testng-execute-compiled-tests-in-jar-file
                
> There should be a way to run unit tests from a dependency jar.
> --------------------------------------------------------------
>
>                 Key: SUREFIRE-569
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-569
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Paul Gier
>         Attachments: SUREFIRE-569.patch
>
>
> In some cases it would be useful to have a set of tests that run with various 
> dependency configurations.  One way to accomplish this would be to have a 
> single project that contains the unit tests and generates a test jar.  
> Several test configuration projects could then consume the unit tests and run 
> them with different dependency sets.  The problem is that there is no easy 
> way to run tests in a dependency jar.  The surefire plugin should have a 
> configuration to allow me to run all or a set of unit tests contained in a 
> dependency jar.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to