Changes in the TestNG listeners

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Changes in the TestNG listeners

Alexandru Popescu ☀

Hi all!

I would like to report quite an important change in the TestNG core
related to reporting and listeners. As you may have noticed, till now
if a @Configuration [1] method was failing or skipped, then
ITestListeners would have been made aware of this through
onTestFailure or onTestSkipped, which was not quite correct, as it
lead to fake reporting.

After this change I have introduced a new *internal* interface
IConfigurationListener which gets notified about @Configuration
methods invocation status (and a convenient interface IResultListener
extending both ITestListener, IConfigurationListener) and
ITestListener is not gonna be anymore notified about @Configuration
failures/skips.

The TestNG plugin developers do not need to worry about this change,
as the remote events are still triggered for the @Configuration
failures and skips, so no changes are required in the plugins.

In what regards the IReporter implementations, they can access the
information about invoked @Configuration methods through ITestContext
which now has the following new methods:

[code]
  IResultMap getPassedConfigurations();

  IResultMap getSkippedConfigurations();

  IResultMap getFailedConfigurations();
[/code]

I have performed all the internal needed changes. Still, as I am not
an user of the EmailableReporter I haven't updated this one, so I
would kindly ask its author (Paul Mendelson) to take a look and adapt
it to the new model.

Hope this note is enough detailed for describing the change.

BR,

./alex
--
.w( the_mindstorm )p.
  TestNG co-founder
EclipseTestNG Creator

[1] I am using the generic @Configuration name for all @Before/@After methods

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Changes in the TestNG listeners

pmendelson2

Thanks for the notification.  I will take a look at this.  I assume
that these changes are only in the SVN repository.  Should I assume
that I can only see these effects by putting a vail in at least 1
@Configuration method.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Changes in the TestNG listeners

Alexandru Popescu ☀

On 12/26/06, Paul <[hidden email]> wrote:
>
> Thanks for the notification.

Np.

> I will take a look at this.

Please let us know when you are done with it.

> I assume
> that these changes are only in the SVN repository.

True.

> Should I assume
> that I can only see these effects by putting a vail in at least 1
> @Configuration method.
>

True.

HTH,

./alex
--
.w( the_mindstorm )p.
  TestNG co-founder
EclipseTestNG Creator

>
> >
>

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Changes in the TestNG listeners

Alexandru Popescu ☀

On 12/26/06, Alexandru Popescu <[hidden email]> wrote:
> On 12/26/06, Paul <[hidden email]> wrote:
> >
> > Should I assume
> > that I can only see these effects by putting a vail in at least 1
> > @Configuration method.
> >
>
> True.
>

Check the test/src: org.testng.internal.conflistener package. You can
use the FailingBeforeTest and FailingAfterTest classes (the
FailingBeforeSuite and FailingAfterSuite will not work, as there is an
old problem with the invocation + listeners lifecycle for suite level,
which is not yet solved).

./alex
--
.w( the_mindstorm )p.
  TestNG co-founder
EclipseTestNG Creator

> HTH,
>
> ./alex
> --
> .w( the_mindstorm )p.
>   TestNG co-founder
> EclipseTestNG Creator
>
> >
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Changes in the TestNG listeners

Alexandru Popescu ☀
In reply to this post by pmendelson2

On 12/26/06, Paul <[hidden email]> wrote:
>
> Thanks for the notification.  I will take a look at this.  I assume
> that these changes are only in the SVN repository.  Should I assume
> that I can only see these effects by putting a vail in at least 1
> @Configuration method.
>

Hi Paul!

Any chance to get this improved soon? We are planning to release the
5.5 very soon and on my list this is the only remaining task. If you
cannot get to it then please let me know, and I will try to put
something together for it.

TIA,

./alex
--
.w( the_mindstorm )p.
  TestNG co-founder
EclipseTestNG Creator

>
> >
>

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---