Problem with "Show only failed test"

I use the following way to organize some of my unittests:


public class MyTestBase
{
     
     public virtual void TestSomething()
     {}
     
     
     public virtual void TestSomethingElse()
     {}
}



public class MyTestSub : MyTestBase
{
     
     public override void TestSomething()
     {}

     
     public void TestSub()
     {
          Assert.IsTrue(false);
     }
}


public class MyTestSub2 : MyTestBase
{
     
     public override void TestSomething()
     {}
}


I want to use R# to see which unittests fail, so I check the "Show only 
failed test" button. I now still see the class MyTestSub2 with 
"MyTestBase.TestSomething" crossed. I do not think it is a failure when a 
testmethod is overridden. I also tried to omit the "test" attribute above 
the overridden methods, but that does not help.

This also happened in R# 4.5, but there it helped to remove the Test 
attribute above the overrides.

Can this be changed, so only real failures are shown?

--
Arnold Nelisse

2 comments
Comment actions Permalink

I tried above code and see only TestProject.MyTestSub.TestSub failing in all modes.

Could you make some sreenshots to illustrate what are you talking about?

0
Comment actions Permalink

Op Fri, 06 Nov 2009 12:39:46 +0100 schreef Victor Kropp 
<no_reply@jetbrains.com>:

I tried above code and see only TestProject.MyTestSub.TestSub failing in 
all modes.

>

Could you make some sreenshots to illustrate what are you talking about?

>

---
Original message URL: 
http://www.jetbrains.net/devnet/message/5249193#5249193



I attached the screenshot. I filtered for only show failed test and I 
still see MyTestSub2 even though it succeeds. I have hundreds of these 
kinds of unittests and this makes it difficult to find the output of the 
unittests that fail. When a testfixture succeeds completely without 
overrides it is not included in the filtered unittestlist.

For instance like this:

public class MyTestSub3 : MyTestBase
{
     
     public void TestSomething3()
     {}
}

MyTestSub3 is not visible in the screenshot. That is what I also want for 
testfixtures with overriden testmethods. Inactive tests are not failures.

I hope this helps to explain my problem.

Arnold Nelisse

0

Please sign in to leave a comment.