Maybe our disconnect is about callbacks after the class vs. the method.
That could be where the misunderstanding is coming from.

-----Original Message-----
From: Jason Chaffee [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 10:11 AM
To: [EMAIL PROTECTED]; Maven Developers List
Cc: Maven Users List
Subject: RE: Re: surefire and testng integration issues with
surefire-2.4.2

I did try it.  I created my own listener and got the exact output I was
looking for.  I am not sure where our disconnect is here, but we
certainly are seeing two different things with respect to the code.

-----Original Message-----
From: Dan Fabulich [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 10:05 AM
To: Maven Developers List
Cc: Maven Users List; [EMAIL PROTECTED]
Subject: Re: surefire and testng integration issues with surefire-2.4.2

Jason Chaffee wrote:

> I brought this up in the past the maven guys were adamant that they
were
> not able to get per test information to output on the console unless
> testng changed.

That's not what I said! :-)  I said that you can't get CLASS
notifications 
unless TestNG changes.  You can get notification at the start/end of the

entire run, and you can get notification at the start/end of every
method, 
but you can't get notification at the start/end of every class.

> TestNG does support this functionality with the ITestListener.
> For example, onStart() will give the start of running a particular
class
> configuration and test methods and onFinish() will be called after all
> of the configuration and test methods have been run.

Sorry, dude, that's not what onStart does.  Did you actually try it?

I've attached a sample project that simply attaches an ITestListener
that 
logs to system.out whenever it gets called, specifically during onStart 
and onFinish.  It's got two test classes: Foo and Bar, each of which
have 
one method "foo()" and "bar()" respectively.  So you'd expect:

onStart [Foo]
onTestStart [foo()]
onTestFinish [foo()]
onFinish [Foo]
onStart [Bar]
onTestStart [bar()]
onTestFinish [bar()]
onFinish [Bar]

But here's what you get instead:

onStart
onTestStart [foo()]
onTestFinish [foo()]
onTestStart [bar()]
onTestFinish [bar()]
onFinish

... not too useful, is it?  In fact, onStart is called at the start/end
of 
the "test" which is TestNG's very silly term for a collection of tests 
that isn't a "group" or a "suite".

-Dan

---------------------------------------------------------------------
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