Assert.Inconclusive in SetUp method fails silently
Bug #591263 reported by
Yodan Tauber
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUnit Framework |
Triaged
|
High
|
Unassigned |
Bug Description
I have a simple test with an instance SetUp method. My SetUp method calls Assert.
When I run through the GUI, the test gets marked with an "?" purple icon, but absolutely no detail text (and in particular, my own "message") appears in any of the tabs.
NUnit 2.5.5.10112
Changed in nunitv2: | |
status: | New → Confirmed |
tags: | added: framework |
Changed in nunitv2: | |
importance: | Undecided → Low |
Changed in nunitv2: | |
milestone: | none → 2.5.8 |
assignee: | nobody → Charlie Poole (charlie.poole) |
Changed in nunitv2: | |
milestone: | 2.5.8 → none |
assignee: | Charlie Poole (charlie.poole) → nobody |
Changed in nunit-3.0: | |
status: | Triaged → Won't Fix |
status: | Won't Fix → Triaged |
Changed in nunit-3.0: | |
status: | Triaged → Won't Fix |
Changed in nunit-3.0: | |
status: | Won't Fix → Triaged |
tags: | added: github |
To post a comment you must log in.
Adding a new tab or modifying one of the existing tabs to show inconclusive results involves changes that we don't want to undertake in NUnit 2.5. This bug is being re-targeted for the nunit 3.0 project, which will include significant gui changes.
Inconclusive results are especially problematic because they are intended to 'disappear' entirely when used in a Theory, but should probably have much more significance when used in a Test.
There are two workarounds in the current release:
1. Use Assert.Ignore, which gives the test the prominence you desired. In a SetUp method, it is much more usual to use Assert.Ignore anyway, since the test is not being run.
2. Use the Properties dialog, accessed from the context menu of the test, to view the message. Of course, you have to first
locate the inconclusive test in the tree to do this.
Charlie