Executed fast test appears in Not Run category in Test Explorer

Bug #1066518 reported by Tom Kris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit Framework
New
Undecided
Unassigned
NUnit Test Adapter
Fix Released
High
Charlie Poole

Bug Description

I use NUnit test adapter in Visual Studio 2012 RTM.

I group tests in Test Explorer by duration and I see that if test is executed in less then 1 ms than it appears in Not Run category. But must appear in Fast category.

For example, when I use built in MSTest test adapter, fast tests appear in Fast category and duration column it shows "< 1 ms", so I believe this is bug in NUnit test adapter not in Visual Studio.

I attach screenshots made for test runned with NUnit test adapter and MSTest test adapter so you can see the difference.

Related branches

Revision history for this message
Tom Kris (krivokrisenko) wrote :
Changed in nunit-vs-adapter:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 0.93
Revision history for this message
Charlie Poole (charlie.poole) wrote :

I have ascertained experimentally that any duration less than .5ms displays as a blank in the test window. I never see '<1ms' so I'm wondering if the window doesn't have some special knowledge of MSTest.

Of course, it's also possible that the MSTest guys have some special knowledge I don't have, so I've asked for advice from the developers of the test window.

Changed in nunit-vs-adapter:
status: Triaged → In Progress
Revision history for this message
Charlie Poole (charlie.poole) wrote :

There are two problems here...

1. NUnit is returning a duration of zero for test cases that take less than 1ms to execute.
2. The IDE is categorizing all such tests as 'Not Run' even though the Outcome shows they ran and passed or failed.

We have to fix point 1 in NUnit itself, while the VS guys will have to fix point 2.

Since NUnit 2.6.2 was just released, we need a workaround in the adapter. I think I can fix it by arbitrarily setting any duration of zero to one tick of 100 nanoseconds, so I'll try that.

Changed in nunitv2:
status: New → Triaged
importance: Undecided → High
Changed in nunit-vs-adapter:
status: In Progress → Fix Committed
Changed in nunit-vs-adapter:
status: Fix Committed → Fix Released
Changed in nunitv2:
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 2.6.3
Changed in nunitv2:
milestone: 2.6.3 → none
Revision history for this message
Charlie Poole (charlie.poole) wrote :

We'll deal with this in nunit-3.0 and the version of the adapter that uses it.

no longer affects: nunitv2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.