I did not run your project.  I created my own listener and ran it in
testng, outside of maven in a test environment at my company.  I will
have to create a different one before I can share it with a wider
audience and I would like to actually test it in maven and with surefire
to see if the behavior still works as expected.

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

Jason Chaffee wrote:

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

Did you run my project?  What did you see?  I see:

Example onStart
Example onTestStart
Example onTestSuccess
Example onTestStart
Example onTestSuccess
Example onFinish

(Actually I just did a clean run and realized I'd forgotten to set 1.5
as 
the compiler source/target, use this attached one instead.)

-Dan

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