ParameterizedTest not in their parent test-suite when FixtureSetup fails in .xml result file

Bug #878955 reported by Frédéric Vandal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit Framework
Invalid
Undecided
Unassigned
NUnit V2
Fix Released
High
Charlie Poole

Bug Description

When the FixtureSetup fails for a ParameterizedTest, I would expect that the test-case node would be under its test suite of type="ParameterizedTest".

Here is what I'm seeing into the result xml files:

When a ParameterizedTest passes, the xml result looks like this:

<test-suite type="TestFixture" name="TestClass1" executed="True" result="Success" success="True" time="25.476" asserts="1">
  <results>
    <test-suite type="ParameterizedTest" name="TestCase1" executed="True" result="Success" success="True" time="4.746" asserts="0">
      <results>
        <test-case name="TestNamespace.TestClass1.TestCaseName1" executed="True" result="Success" success="True" time="1.242" asserts="6" />
        ...

When fixture fails, the xml result looks like this:

<test-suite type="TestFixture" name="Task_GetExistingOwner_SiteCodeConfiguredAndActiveTests" executed="True" result="Error" success="False" time="0.009" asserts="1">
  <failure>
    <message><![CDATA[SetUp : System.Exception : some error ]]></message>
    <stack-trace><![CDATA[at Some Assembly]]></stack-trace>
  </failure>
  <results>
    <test-case name="TestNamespace.TestClass1.TestCaseName1" executed="True" result="Failure" success="False" time="0.000" asserts="0">
      <failure>
        <message><![CDATA[TestFixtureSetUp failed in Somewhere]]></message>
        <stack-trace />
      </failure>
    </test-case>
    <test-suite type="ParameterizedTest" name="TestCase1" executed="True" result="Failure" success="False" time="0.000" asserts="0" />
  </results>

Tags: framework

Related branches

Changed in nunitv2:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 2.6.0
Changed in nunitv2:
status: In Progress → Fix Committed
Changed in nunitv2:
status: Fix Committed → Fix Released
tags: added: framework
Changed in nunit-3.0:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 2.9.6
Revision history for this message
Charlie Poole (charlie.poole) wrote :

Marking this invalid for NUnit 3.0 because the code that was changed in 2.6 no longer exists in 3.0.

Changed in nunit-3.0:
milestone: 2.9.6 → none
assignee: Charlie Poole (charlie.poole) → nobody
status: Triaged → Invalid
importance: High → Undecided
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.