Add a hook to allow arguments in parameterized tests to be seen by NUnit.Core.EventListener

Bug #1367311 reported by Dave Kipfer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit Framework
Won't Fix
Undecided
Unassigned

Bug Description

It would be helpful to be able to receive parameter values in parameterized test cases when creating custom consoles with alternative reporting features (the one I have creates a Robot framework style report from a set of NUnit tests).

A generic hook/interface/whatever to allow parameters to be repackaged into something serializable, if necessary, should make parameters available to EventListener implementations.

For example, what I've done in a modification of 2.6.2, is to add a "String[] Parameters" member to NUnit.Core.TestName and filled it in NUnit.Core.Builders.NUnitTestCaseBuilder.BuildSingleTestMethod(). Each parameter is run through a reflection utility which recursively walks through the fields and produces a string outlining the content. The parameters are then serializable and survive the trip between AppDomains.

Revision history for this message
Charlie Poole (charlie.poole) wrote :

I'm closing this as Won't Fix because we no longer accept bugs on Launchpad.

Unfortunately, our warning message only seems to appear on the Overview page... I'll see if we can make appear when you actually try to enter a bug without looking at that page.

In principle, your bug should be created at https://github.com/nunit/nunit-framework, where we are developing NUnit 3.0 now.

However, I suggest you first familiarize yourself with the 3.0 framework before re-creating it. Addins no longer exist in 3.0 and any runner simply receives info in XML about each test result. An issue you create would probably be asking for some changes to the XML format we use. In fact, I hope you will do that, since the desired output format drives a lot of other things in the framework.

Sorry for the extra work! On a positive note, what you want to do should be much simpler in NUnit 3.0.

Changed in nunit-3.0:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.