Failure in Assembly level Action attribute causes crash

Bug #726313 reported by Charlie Poole
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit V2
Fix Released
Critical
Jordan Terrell

Bug Description

If an assembly-level action attribute causes an error or failure in it's start phase, a null reference occurs in TestSuite.MarkTestFailed when attempting to acess this.FixtureType.Name.

Before the introduction of action attributes it was not possible to have a failure in setup unless there was a fixture, so no test for FixtureType being null was made. We need to test for a non-null fixtureType before trying to access it. This will also apply to marking child tests as invalid or ignored - essentially, all references to FixtureType on the test suite must be guarded now.

Changed in nunitv2:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Jordan Terrell (jterrell)
milestone: none → 2.6.0b1
Revision history for this message
Jordan Terrell (jterrell) wrote :

Interesting - I can't reproduce this error using the NUnit GUI runner - only through Nant.

Revision history for this message
Charlie Poole (charlie.poole) wrote : Re: [Bug 726313] Re: Failure in Assembly level Action attribute causes crash

I suggest you temporarily put an action attribute on an assembly and
throw an exception in the before method. What it should do is mark
all the tests as failures. Instead, it crashes in MarkTestFailed.

Charlie

On Sun, Feb 27, 2011 at 6:38 PM, Jordan Terrell
<email address hidden> wrote:
> Interesting - I can't reproduce this error using the NUnit GUI runner -
> only through Nant.
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https://bugs.launchpad.net/bugs/726313
>
> Title:
>  Failure in Assembly level Action attribute causes crash
>

Changed in nunitv2:
status: Triaged → In Progress
Changed in nunitv2:
status: In Progress → Fix Committed
Changed in nunitv2:
status: Fix Committed → Fix Released
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.