Adding more information to html report.

View: New views
4 Messages — Rating Filter:   Alert me  

Adding more information to html report.

by LidiaM :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi

In our testing we call TestNG twice, to execute the same set of tests
on different browser.  The end result is such that we have two sets of
results, stored under test-output/<browser> directory.  In order to
check results, we have to view html reports for each browser
separately and can't tell from the report what browser it belongs to
(other than by url).

Is there a way to extend current TestNG reporter to add browser
information to the report xml file (testng-results.xml) so that it is
reported in the html reports?

Any input appreciated.

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


Re: Adding more information to html report.

by Cédric Beust ♔ :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Lidia,

Sure, everything is possible :-)

If this extra information will be useful to all TestNG users, I'll be happy to accept patches to the existing reporter, but if it's more specific to your situation (which appears to be the case), you should probably just implement your own reporter...

--
Cedric


On Tue, Oct 27, 2009 at 7:45 PM, Lidia <lidiam@...> wrote:

Hi

In our testing we call TestNG twice, to execute the same set of tests
on different browser.  The end result is such that we have two sets of
results, stored under test-output/<browser> directory.  In order to
check results, we have to view html reports for each browser
separately and can't tell from the report what browser it belongs to
(other than by url).

Is there a way to extend current TestNG reporter to add browser
information to the report xml file (testng-results.xml) so that it is
reported in the html reports?

Any input appreciated.

Thanks
Lidia




--
Cédric



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


Re: Adding more information to html report.

by LidiaM :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Let me rephrase the question, to make it more generic.

By default tests are reported based on the test class/method names.
The question is, can I change them programatically?

I see from the API description, that I can provide testName when using
@Test annotation on the class.  I get a browser name through system
property.  I would like to append browser name to the testName (and
ideally method names as well).  Is there a way to do it?

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


Re: Adding more information to html report.

by Cédric Beust ♔ :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Lidia,

On Mon, Nov 2, 2009 at 8:56 PM, Lidia <lidiam@...> wrote:

Let me rephrase the question, to make it more generic.

By default tests are reported based on the test class/method names.
The question is, can I change them programatically?

I see from the API description, that I can provide testName when using
@Test annotation on the class.  I get a browser name through system
property.  I would like to append browser name to the testName (and
ideally method names as well).  Is there a way to do it?

Yes, that's what org.testng.ITest is for:  override getName() and return the name of your test + name of the browser, and that name will appear in the HTML reports (see a thread earlier today on this very topic).

--
Cédric



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