[testng-users] Project-specific listeners no longer work in Eclipse

88 views
Skip to first unread message

Spencer Uresk

unread,
May 5, 2010, 6:30:59 PM5/5/10
to testng-users
We've used a custom listener with the Eclipse plugin for a while, and
just recently noticed that it doesn't seem to be working anymore. If
you go to the TestNG properties for a project and attempt to add
something to the "Listeners/reporters" setting, it appears to work,
but when you come back to it, the value is gone.

A quick perusal of the TestNGPropertyPage class shows why: Lines 174
and 187, which save and display the custom listeners/reporters, are
commented out. Was this intentional? I may be missing something, but
it seems odd to remove the underlying behavior but leave the field
there.

Further, even if we programmatically add a listener (by saving a
preference on the testng property node with a name of <project
name>.reporters), it still doesn't appear to use the listener. This
has worked in the past.

Did something fundamentally change with regards to listeners recently?

Thanks,

- Spencer

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

Cédric Beust ♔

unread,
May 5, 2010, 7:37:38 PM5/5/10
to testng...@googlegroups.com
Hi Spencer,

Yes, the latest version of the plug-in provides a more general way to specify parameters for launches (including listeners):  you can now specify a "template" testng.xml with all the settings you need and the launch configuration will use the parameters found in there for all your launches.

You should definitely no longer be seeing the old listeners text field since it's been superseded by this new approach, what version of the plug-in are you using?

-- 
Cédric

--
Cédric

Spencer Uresk

unread,
May 5, 2010, 7:56:32 PM5/5/10
to testng-users
Thanks Cedric.

I'm using 5.12.0.6. I did a fresh install of Eclipse and installed the
TestNG plugin directly from the update site, and this is what I see
when I go to <project> -> Preferences -> TestNG:

http://www.flickr.com/photos/uresk/4582848798/sizes/o/

- Spencer
> > testng-users...@googlegroups.com<testng-users%2Bunsu...@googlegroups.com>
> > .

Cédric Beust ♔

unread,
May 5, 2010, 8:02:49 PM5/5/10
to testng...@googlegroups.com
Wow, this is really weird.  I'm using 5.12.0.6 on Mac as well (Eclipse version is 20090920-1017) and I'm seeing something different:  http://imgur.com/x1tQY.png

-- 
Cédric

Spencer Uresk

unread,
May 5, 2010, 8:11:05 PM5/5/10
to testng-users
I see that when I go to the workspace preferences page. Is that where
you took that screenshot - it looks like the global preference page,
not the project-specific one? In my previous posts, I was referring to
the project preferences, not the workspace preferences.

- Spencer
> > <testng-users%2Bunsu...@googlegroups.com<testng-users%252Buns...@googlegroups.com>

Spencer Uresk

unread,
May 5, 2010, 8:19:56 PM5/5/10
to testng-users
Are you looking at the project preferences or workspace preferences?
Your screenshot looks like the workspace preferences.

- Spencer
> > <testng-users%2Bunsu...@googlegroups.com<testng-users%252Buns...@googlegroups.com>

Cédric Beust ♔

unread,
May 6, 2010, 10:08:52 AM5/6/10
to testng...@googlegroups.com
Oh you're right.  I forgot that the listeners could also be specified on a per-project basis as well.

I'll need to remove that text box and replace it with the "Template XML file", like I did for Project wide preferences.

-- 
Cédric
Reply all
Reply to author
Forward
0 new messages