nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #02661
[Bug 973248] Re: Nunit 2.6 Gui Showing wrong result state
** Attachment added: "NunitBug.png"
https://bugs.launchpad.net/bugs/973248/+attachment/3001708/+files/NunitBug.png
--
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/973248
Title:
Nunit 2.6 Gui Showing wrong result state
Status in NUnit V2 Test Framework:
New
Bug description:
I was using NUnit Version 2.5.2 dll for our customised nunit test application. Then It was showing proper reusult status in TestSuiteTreeView.Like if any of the child node having failure result ,it also shows parent node as failed status (Red Cross). But when I updated NUnit version 2.6 it went wrong. Now the status of the parent node is dependent on last result recieved by TestTreeNode.
When I tried to find out the root cause of this issue ,then I comes to know in TestSuiteTreeNode class under Nunit.UiKit namespace ,there is one method CalcImageIndex.This method is changed following code .In version 2.6 it is as follow
private int CalcImageIndex()
{
if (this.result == null)
{
switch (this.test.RunState)
{
case RunState.Ignored:
return IgnoredIndex;
case RunState.NotRunnable:
return FailureIndex;
default:
return InitIndex;
}
}
else
{
switch (this.result.ResultState)
{
case ResultState.Inconclusive:
return InconclusiveIndex;
case ResultState.Skipped:
return SkippedIndex;
case ResultState.NotRunnable:
case ResultState.Failure:
case ResultState.Error:
case ResultState.Cancelled:
return FailureIndex;
case ResultState.Ignored:
return IgnoredIndex;
case ResultState.Success:
foreach (TestSuiteTreeNode node in this.Nodes)
if (node.ImageIndex == IgnoredIndex)
return IgnoredIndex;
return SuccessIndex;
default:
return InitIndex;
}
}
}
In Version 2.5.2 it is as follow
private int CalcImageIndex()
{
if (this.result == null)
{
switch (this.test.RunState)
{
case RunState.Ignored:
return IgnoredIndex;
case RunState.NotRunnable:
return FailureIndex;
default:
return InitIndex;
}
}
else
{
switch (this.result.ResultState)
{
case ResultState.Inconclusive:
return InconclusiveIndex;
case ResultState.Skipped:
return SkippedIndex;
case ResultState.NotRunnable:
case ResultState.Failure:
case ResultState.Error:
case ResultState.Cancelled:
return FailureIndex;
case ResultState.Ignored:
return IgnoredIndex;
case ResultState.Success:
foreach (TestSuiteTreeNode node in this.Nodes){
if (node.ImageIndex == FailureIndex)
return FailureIndex;
if (node.ImageIndex == IgnoredIndex)
return IgnoredIndex;
}
return SuccessIndex;
default:
return InitIndex;
}
}
}
If you see case ResultState.Success ,you will get the differnce. Why the failure case check is removed in that case?
To manage notifications about this bug go to:
https://bugs.launchpad.net/nunitv2/+bug/973248/+subscriptions
References