This is a migrated thread and some comments may be shown as answers.

Unit Test Runner show wrong result

1 Answer 32 Views
Code Analysis
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Torsten
Top achievements
Rank 1
Torsten asked on 05 Jan 2012, 04:15 PM
Hi,

I use NUNit. I have a test method declared using the <Values(...)>-attribute like this:

    <Test()> _
    Public Sub CanNotConvertCodeToDayTest(<Values("1Y""-2S1M""6M10""10-30D""M-5B")> maturityString As String)
        Dim result As Boolean = MaturityConverter.CanConvertCodeToDay(maturityString)
 
        Assert.AreEqual(False, result)
    End Sub

The method will be run 5 times. The first time the test (using the allowed parameter avlue 1Y) fails. All following test runs succeed. The Unit Test Window now shows that the test succeeded. There is no indication that the first run failed. Using the NUnit Test Runner all 5 runs are shown and the first run is marked as failed.

To me it seems that your test runner takes the last run of the tests to determine if they succeeded or not.

If so, can you fix this?

1 Answer, 1 is accepted

Sort by
0
Blagoev
Telerik team
answered on 09 Jan 2012, 12:40 PM
Hi,

 Thanks for sending the problem. Indeed there is JustCode doesn't support this scenario yet. We are aware of the problem. Importunately I can't tell you when this will be fixed. I created a PITS item 9237 for this so you know when its ready. We will investigate its support and will be looking into adding such support in the future.

Greetings,
Blagoev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Code Analysis
Asked by
Torsten
Top achievements
Rank 1
Answers by
Blagoev
Telerik team
Share this question
or