Re: [nunit-discuss] How to get HTML report from Nunit XML?

2,675 views
Skip to first unread message

Charlie Poole

unread,
Sep 19, 2012, 10:53:04 AM9/19/12
to nunit-...@googlegroups.com
Hi Sirus,

You can...

1) Write a program to create the html
2) Write a transform for the same purpose, and apply it to the XML
3) Use nunit2report, part of nantcontrib
4) Use NUnit-Results, part of nunit-xtp (our project group),
http://launchpad.net/nunit-results
5) Use nunit-summary, also part of nunit-xtp,
https://launchpad.net/nunit-summary
... and any number of other third-party tools

The NUnit 3.0 console runner supports #2 (if you provide the transform)
and will also have a native html report.

Charlie

On Wed, Sep 19, 2012 at 7:04 AM, sirus <tulach...@gmail.com> wrote:
> Hello Nunit Experts,
>
> I need a nice report after running Nunit test scripts. I can only get Nunit
> XML after running the Nunit tests.
>
> Is there anyway i can get a nice report for all the test pass/fail from the
> xml?
>
> Thanks
>
> Sirus
>
> --
> You received this message because you are subscribed to the Google Groups
> "NUnit-Discuss" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/nunit-discuss/-/JPOb7JGEa7sJ.
> To post to this group, send email to nunit-...@googlegroups.com.
> To unsubscribe from this group, send email to
> nunit-discus...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nunit-discuss?hl=en.

Ashok Tulachan

unread,
Sep 19, 2012, 1:07:43 PM9/19/12
to nunit-...@googlegroups.com
Hi Charlie,
 
Thank you for your prompt response.

I'm still confused. Do you mean I have to write a program, XSL and then only use Nunitreport or Nunitsummary project of yours? I was hoping your project will write the program, use XSL and give me report based on my XML result.
 
I downloaded the zip file from the site http://launchpad.net/nunit-results but not sure how to associate with my current C# project. I even added the .dll file as an reference to my project.

All I need is to transform test result of XML from Nunit project to HTML report?

If i had to write a program and transform XSL and apply to the HTML before using your program, what's the use of your program NUnit-Results and nunit-summary?

Can you help me out?

Last but not least, i'm not sure why Nunit can't support getting the output in HTML like other MBUnit and other JAVA frameworks like TestNG.

Thank you for your time. Hope i haven't asked you too many questions :).

Sirus


--
Regards,
 
Ashok Tulachan
 

Charlie Poole

unread,
Sep 19, 2012, 1:59:20 PM9/19/12
to nunit-...@googlegroups.com
Hi Ashok,

Maybe it wasn't clear that I gave you six different answers. Look at
my list again
and see if it makes sense in that light. IOW, you can choose any of the six ways
listed to produce your report - as well as many other 3rd party tools.

In the specific case of NUnit-Result, you just download and use it,
like any other
tool. It should not be linked with any project of yours.

Regarding this...

> Last but not least, i'm not sure why Nunit can't support getting the output
> in HTML like other MBUnit and other JAVA frameworks like TestNG.

That's why I wrote this...

>> The NUnit 3.0 console runner supports #2 (if you provide the transform)
>> and will also have a native html report.

Charlie

Ashok Tulachan

unread,
Sep 19, 2012, 4:35:37 PM9/19/12
to nunit-...@googlegroups.com
Thank you for the clarification, Charlie.
 
I was able to run both NUnitResults and NUnitSummary although NUnitSummary only gave the summary of the test results in command prompt unlike the HTML Report created by NUnitResults.
 
I also wish we could run the same program like in cmd prompt by NUnit GUI :).
 
Thanks

Charlie Poole

unread,
Sep 19, 2012, 6:16:25 PM9/19/12
to nunit-...@googlegroups.com
Hi Sirus,

Glad it helped. If you see a need for changes in NUnit-Results, it has its own
bug tracker on launchpad. Changes that seem like too much work right now
may be rescheduled for NUnit 3.0.

Regarding integrated html reporting from the gui, I suggest adding an NUnit
3.0 feature requrest at http://bugs.launchpad.net/nunit-3.0

Charlie

Ashok Tulachan

unread,
Sep 19, 2012, 7:55:46 PM9/19/12
to nunit-...@googlegroups.com
Thank You Charlie for your input,

Yes definitely, I would put a bug tracker for HTML reporting feature from GUI. Hopefully we can get it on NUnit 3.0 :-).

Also while I played around with the NUnitResults, I was wondering if there is any way that I could have my test output statements(like Console.WriteLine) statements in the HTML report as well.

Finally, i would be also glad if you could sent a quick email everytime NUnit gets a new release.

Thanks,

Sirus

Charlie Poole

unread,
Sep 20, 2012, 1:52:20 AM9/20/12
to nunit-...@googlegroups.com
Hi Sirus,

On Wed, Sep 19, 2012 at 4:55 PM, Ashok Tulachan <tulach...@gmail.com> wrote:
> Thank You Charlie for your input,
>
> Yes definitely, I would put a bug tracker for HTML reporting feature from
> GUI. Hopefully we can get it on NUnit 3.0 :-).

Great.

> Also while I played around with the NUnitResults, I was wondering if there
> is any way that I could have my test output statements(like
> Console.WriteLine) statements in the HTML report as well.

Not at this time, because the console output statements are not in the XML
file. That's planned for 3.0.

> Finally, i would be also glad if you could sent a quick email everytime
> NUnit gets a new release.

NUnit releases are always announced on this list and on Launchpad.

Charlie
Reply all
Reply to author
Forward
0 new messages