← Back to team overview

nunit-core team mailing list archive

[Bug 726313] [NEW] Failure in Assembly level Action attribute causes crash

 

Public bug reported:

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.

** Affects: nunitv2
     Importance: Critical
     Assignee: Jordan Terrell (jterrell)
         Status: Triaged

** Changed in: nunitv2
       Status: New => Triaged

** Changed in: nunitv2
   Importance: Undecided => Critical

** Changed in: nunitv2
     Assignee: (unassigned) => Jordan Terrell (jterrell)

** Changed in: nunitv2
    Milestone: None => 2.6.0b1

-- 
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

Status in NUnit V2 Test Framework:
  Triaged

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.



Follow ups

References