You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by dan tran <da...@gmail.com> on 2006/10/02 16:25:17 UTC
Re: [M2] Surefire executing a single test suite.
One suggestion,
Can you repoduce the problem in a small project? this way you
can open a JIRA and other ppl can take a crack at it.
Thanks
-D
On 9/30/06, Michael Rimov <ri...@centercomp.com> wrote:
>
>
>
> > -----Original Message-----
> > From: dan tran [mailto:dantran@gmail.com]
> > Sent: Saturday, September 30, 2006 7:41 AM
> > To: Maven Users List
> > Subject: Re: [M2] Surefire executing a single test suite.
> >
> > Mike, I have a small good news for you, I have the exact test scenario
> and
> > have no problem with maven2.
>
> Actually, that's excellent news. I was starting to wonder :)
>
> > So you will need to do further investigation in your java junit setup .
> > Are you able to use an IDE to run your suite?
>
> Yes, absolutely -- it runs inside an IDE fine and it runs within maven1 as
> well fine.
>
> I tried renaming the current plugins directory and forcing a clean
> download
> (once before I had weird problems that a clean repository fixed)... no
> dice
> there too.
>
> Any chance I could see the relevant section of your POM?
>
> Thanks for the reply!
>
>
> -Mike
>
>
>
> >
> > -D
> >
> >
> > On 9/30/06, Michael Rimov <ri...@centercomp.com> wrote:
> > >
> > > Hi All,
> > >
> > > I didn't see a response to my first post -- I did some additional
> > > experimentation with it:
> > >
> > > > -----Original Message-----
> > > > From: Michael Rimov [mailto:rimovm@centercomp.com]
> > > > Sent: Friday, September 29, 2006 5:11 AM
> > > > To: users@maven.apache.org
> > > > Subject: [M2] Surefire executing a single test suite.
> > > >
> > > > I've been working on updating the build system for a project
> > > > (http://emo.sf.net/) to maven2.
> > > >
> > > > Because of the extensive database setup, it all unit tests execute
> > > through
> > > > a
> > > > single test suite which has the format liket his:
> > > >
> > > >
> > > > com.sri.emo.test.EmoTestSuite:
> > > >
> > > > public static junit.framework.Test suite() throws Exception {
> > > >
> > > > EmoTestSuite ts = new EmoTestSuite();
> > > >
> > > > ts.addTest(com.sri.emo.dbobj.TestSchema.suite());
> > > >
> > > > ts.addTestSuite(com.sri.emo.TestEmoSchema.class);
> > > >
> > > >
> > ts.addTestSuite(com.sri.emo.test.TestDatabaseTestFixture.class);
> > > >
> > > >
> > > >
> > > > //Other test suites
> > > >
> > > > return ts;
> > > >
> > > > }
> > >
> > > Followup: If I put a method: testSomething() {} inside the
> > EmoTestSuite
> > > class, then THAT test case gets run (within the same class) -- so it
> > > specifically appears to be a problem with the surefire plugin not
> > calling
> > > suite() to build a test suite.
> > >
> > > Is there a setting that I'm just missing to get surefire to do
> this? Is
> > > it
> > > a bug? Does anyone have a workaround to suggest? Am I misapplying
> > > Surefire?
> > >
> > > Thanks in advance!
> > >
> > > -Mike
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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: [M2] Surefire executing a single test suite.
Posted by dan tran <da...@gmail.com>.
extend your AppTest with TestCase, not TestSuite. It works for me
package org.example;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( )
{
super();
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( SampleTest.class );
}
}
On 10/3/06, Michael Rimov <ri...@centercomp.com> wrote:
>
> > Can you repoduce the problem in a small project? this way you
> > can open a JIRA and other ppl can take a crack at it.
>
>
> I have and was about to start a new one, and then found MSUREFIRE-131,
> which
> I believe is the same problem, yet this person provided a basic patch, so
> we'll see where it goes from there.
>
> I attached my test case just in case it helps. Thanks for the replies
> guys!
>
> -Mike
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
RE: [M2] Surefire executing a single test suite.
Posted by Michael Rimov <ri...@centercomp.com>.
> Can you repoduce the problem in a small project? this way you
> can open a JIRA and other ppl can take a crack at it.
I have and was about to start a new one, and then found MSUREFIRE-131, which
I believe is the same problem, yet this person provided a basic patch, so
we'll see where it goes from there.
I attached my test case just in case it helps. Thanks for the replies guys!
-Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org