You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stephen Connolly <st...@gmail.com> on 2008/02/12 13:59:29 UTC
Surefire not picking up tests from test-jar
Has anybody tried running a test-jar with Surefire 2.4.1?
It's not picking up any of our unit tests from the test jar.
We're using JUnit 4.4 (but the tests in the test jar are all JUnit 3.8.1)
It's picking up the unit tests from src/test/java fine, but we have packaged
our compatability tests are in a separate jar file so that they can be used
across the two modules that must be compatable.
-Stephen
Re: Surefire not picking up tests from test-jar
Posted by Stephen Connolly <st...@gmail.com>.
On Feb 12, 2008 7:13 PM, Stephen Connolly <st...@gmail.com>
wrote:
> somebody needs to update the dogs that claim you can do this though
Damn typing on the iTouch! I t was supposed to be update the docs
Re: Surefire not picking up tests from test-jar
Posted by Stephen Connolly <st...@gmail.com>.
I don't know if it ever worked. I switched to the dependency hack.
somebody needs to update the dogs that claim you can do this though
On 2/12/08, Dan Fabulich <da...@fabulich.com> wrote:
> Stephen Connolly wrote:
>
> > Has anybody tried running a test-jar with Surefire 2.4.1?
> >
> > It's not picking up any of our unit tests from the test jar.
> >
> > We're using JUnit 4.4 (but the tests in the test jar are all JUnit 3.8.1)
> >
> > It's picking up the unit tests from src/test/java fine, but we have
> packaged
> > our compatability tests are in a separate jar file so that they can be
> used
> > across the two modules that must be compatable.
>
> When you say "with Surefire 2.4.1" do you mean that this used to work in
> an earlier version?
>
> Based on what I think I know about Surefire, it would surprise me if this
> ever worked. The algorithm for finding tests searches for .class files in
> target/test-classes.
>
> One workaround would be to use maven-dependency-plugin to unpack your
> test-jar(s) into the target/test-classes directory.
>
> If this is a regression, please file an issue in JIRA with a minimal Maven
> project that reproduces the problem. (In this case, I think the
> appropriate thing would be a simple reactor build that installs a test-jar
> in one sub-project and tries to run its tests in a second sub-project.)
>
> -Dan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Surefire not picking up tests from test-jar
Posted by Dan Fabulich <da...@fabulich.com>.
Stephen Connolly wrote:
> Has anybody tried running a test-jar with Surefire 2.4.1?
>
> It's not picking up any of our unit tests from the test jar.
>
> We're using JUnit 4.4 (but the tests in the test jar are all JUnit 3.8.1)
>
> It's picking up the unit tests from src/test/java fine, but we have packaged
> our compatability tests are in a separate jar file so that they can be used
> across the two modules that must be compatable.
When you say "with Surefire 2.4.1" do you mean that this used to work in
an earlier version?
Based on what I think I know about Surefire, it would surprise me if this
ever worked. The algorithm for finding tests searches for .class files in
target/test-classes.
One workaround would be to use maven-dependency-plugin to unpack your
test-jar(s) into the target/test-classes directory.
If this is a regression, please file an issue in JIRA with a minimal Maven
project that reproduces the problem. (In this case, I think the
appropriate thing would be a simple reactor build that installs a test-jar
in one sub-project and tries to run its tests in a second sub-project.)
-Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org