Disabling Report Listeners to use ReportNG's (+property in the XML file)

1,609 views
Skip to first unread message

Felipe Knorr Kuhn

unread,
Feb 24, 2010, 3:01:40 PM2/24/10
to testng...@googlegroups.com
Hello all,

I was about to implement my own report listeners, then I found ReportNG [1]

Using ReportNG is as easy as setting a listener like this <listener class-name="org.uncommons.reportng.HTMLReporter"/>

Now I have two questions:

1) How do I disable the default listener?
2) How to I set properties like above in my testng.xml file?
<sysproperty key="org.uncommons.reportng.title" value="My Test Report"/>

Thanks and regards,
FK


[1] https://reportng.dev.java.net/

Cédric Beust ♔

unread,
Feb 24, 2010, 3:24:05 PM2/24/10
to testng...@googlegroups.com
On Wed, Feb 24, 2010 at 12:01 PM, Felipe Knorr Kuhn <fkn...@gmail.com> wrote:
Hello all,

I was about to implement my own report listeners, then I found ReportNG [1]

Using ReportNG is as easy as setting a listener like this <listener class-name="org.uncommons.reportng.HTMLReporter"/>

Now I have two questions:

1) How do I disable the default listener?

Invoke TestNG with -usedfaultlisteners false
 
2) How to I set properties like above in my testng.xml file?
<sysproperty key="org.uncommons.reportng.title" value="My Test Report"/>

Not possible in testng.xml (since TestNG has already started, the sysproperties are already set by the time TestNG reads that file).

Why not do it on the command line or build.xml?

--
Cédric


Felipe Knorr Kuhn

unread,
Feb 24, 2010, 3:43:47 PM2/24/10
to testng...@googlegroups.com
Thanks Cédric,

I'm using the Eclipse plugin to make it easier for me to write the tests and the dev team to run them after I'm done.

Even the Selenium server is started by the tests, so I want to avoid using the command line :)

I was able to launch TestNG with the "-usedefaultlisteners false" option via the Eclipse plugin, but the environmental options did not work, just like the summary of the tests :)

Regards,

FK

2010/2/24 Cédric Beust ♔ <cbe...@google.com>
--
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,
Feb 24, 2010, 3:46:36 PM2/24/10
to testng...@googlegroups.com


On Wed, Feb 24, 2010 at 12:43 PM, Felipe Knorr Kuhn <fkn...@gmail.com> wrote:
I was able to launch TestNG with the "-usedefaultlisteners false" option via the Eclipse plugin, but the environmental options did not work, just like the summary of the tests :)

Can you be more specific?  What do you call the "environmental options"?

--
Cédric


Felipe Knorr Kuhn

unread,
Feb 24, 2010, 3:52:12 PM2/24/10
to testng...@googlegroups.com
The Eclipse plugin settings window has an "Environment" tab to set the environment variables.

I believed environment variables could be used as the system properties supported by ReportNG.

2010/2/24 Cédric Beust ♔ <cbe...@google.com>


--
Cédric


Reply all
Reply to author
Forward
0 new messages