I've been experiencing the same problem -- all TestNG tests fail under
Surefire 2.2.  I hadn't tried the 2.2-SNAPSHOT.

In my case the tests are failing due the 'beforeTestMethod' method being
invoked.  For example,

public class ExampleTest {

        private ObjectUnderTest objectUnderTest;

        @Configuration(beforeTestMethod = true)
        public void setUp() {
                objectUnderTest= new ObjectUnderTest();
        }

        @Configuration(afterTestMethod = true)
        public void tearDown() {
           objectUnderTest= null;
        }

        @Test(groups = { "integration" })
      public void testObjectUnderTest() {
                assert objectUnderTest != null;
        }
}

This test will fail at

    assert objectUnderTest != null;

Indicating that setUp() was not called.

mT

> -----Original Message-----
> From: Marco Mistroni [mailto:[EMAIL PROTECTED] 
> Sent: June 26, 2006 9:50 AM
> To: Maven Users List
> Subject: Re: Sample project using M2/EJB3/TestNG for using 
> jboss embeddable container
> 
> Hi,
>  just noticed one minor thing (i already post msg on testng 
> mailing list) in that project, surefire version is 2.2-SNAPSHOT
> 
> if you change it to 2.2, all the test will fail.. for some 
> weird reason that i still have to figue out
> 
> this just to let you know
> 
> rgds
>  marco
> 
> On 6/26/06, Darren Hartford <[EMAIL PROTECTED]> wrote:
> >
> > Yay! Thanks Marco, Tim  :-)
> >
> > > -----Original Message-----
> > > From: Marco Mistroni [mailto:[EMAIL PROTECTED]
> > > Sent: Sunday, June 25, 2006 2:02 PM
> > > To: Maven Users List
> > > Subject: Sample project using M2/EJB3/TestNG for using jboss 
> > > embeddable container
> > >
> > > hi all,
> > >    i have added to maven pages a sample project htat uses
> > > EJB3 and jboss embeddable container for unit testing..
> > > sample app is available here
> > >
> > > http://docs.codehaus.org/display/MAVENUSER/Examples
> > >
> > > thanx for Mr Tim Kettler for setting up the page
> > >
> > > have fun with it, and feel free to improve it (app is 
> really lame :)
> > >
> > > regards
> > >  marco
> > >
> > > PS feel free to mail me back @  [EMAIL PROTECTED]  if 
> you have any 
> > > problems
> > >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to