2
Vote

Empty TestCaseResultServerEvent is added to TestReport when executing test with ExpectedException attribute

description

Let say that I have only one test method that has the ExpectedException attribute applied to it. When I run StatLight the report says that there are two tests in total - one that has passed and one that has failed.
 
This problem is caused by the fact that the exception that is thrown during the test executing is treated as UnahndledException and a separate TestCaseResultServerEvent is added to the current TestReport in addition to the TestCaseResultServerEvent that is added for the passing test (if it passes of course).
 
This is really problematic when creating test lists like TRX. For TRX StatLight stops working and for the other formats it just print one additional incorrect entry.
 
Hope this helps.

comments

staxmanade wrote May 4, 2012 at 4:05 AM

This sounds like a symptom of this issue http://statlight.codeplex.com/workitem/11906 which I hoped I fixed, but it sounds like it may not be.

wrote Jan 8, 2013 at 1:54 PM

wrote Feb 14, 2013 at 8:17 PM