Before making my suggestion, I want to thank you all for
such a useful time-saving and embarrassment-avoiding tool: THANK YOU! :)
Charlie Poole spoke at the South Sound .NET Users Group
(SSDOTNET) in Olympia
last night. A question came up on
generating reports and how NUnit produces XML containing the results which can
be processed various ways (e.g., with XSL). My suggestion is that a menu item be
added to the Tools menu, perhaps called “Generate Report of Results…”
which prompts for an XSL file, defaulting to an NUnit sub-folder. I am also suggesting that one or two XSL
files be included with the NUnit install.
Those who wish to customize their own reports with XSL can either add
files to this sub-folder or browse to where they keep theirs. Including the two samples can give some
of us XSL-challenged folks a starting point. Once an XSL file is selected, NUnit would
generate the XML, transform it with the XSL and save
the result to a (text?) file.
For samples, perhaps these two: (1) Detailed,
showing everything that the XML has available; and, (2) Summary of Failures,
showing the names of the tests resulting in a failed state.
A significant drawback on this is it being limited to XSL
for generating the reports. An
alternative would be to provide the menu item, but using plug-ins (which would
be listed as sub-menu items) to allow custom extension of the report-generation
process. A simple plug-in providing
the XSL-transformation would provide the above functionality, and provide an
example of how to code a plug-in for those who wish to use some other engine
(e.g., C# or VB program, Crystal Reports, Active Reports, Excel, etc.) This touches on one of the
questions asked at the SSDOTNET meeting – will NUnit be able to supply
data to VS2005 for access to the VS2005 reports? If someone really wants it, perhaps they
can write a report plug-in which will port the data to the appropriate VS2005
object for report generation (assuming that there is such a VS2005 object…) Such plug-ins would allow more creative
approaches of reporting to be available from the NUnit gui. For example, generating
charts, sending email notification, auditing unit test results, etc.
If you have questions on this, feel free to contact me at emersonm@xxxxxxxx.
Thanks,
Mark
Mark
Emerson
IS
Manager
Law
Enforcement Support Agency
Tacoma, WA