No Source Available for Async Tests

Bug #1210536 reported by Richard Lawley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit Test Adapter
Fix Released
High
Charlie Poole

Bug Description

Tested with Visual Studio 2012 and 2013 Preview, latest test adapter from gallery (0.96.0.4).

When you double-click on a normal Unit Test in Test Explorer from Visual Studio, you are taken to the source definition of that test. When you double-click an async test, nothing happens.

Sample Code:

    [TestFixture]
    public class SampleFixture
    {
        [Test]
        public async Task AsyncTest()
        {
            Assert.Fail();
        }

        [Test]
        public void SyncTest()
        {
            Assert.Fail();
        }
    }

Instructions to reproduce:

* Start a new Class Library (add nunit via nuget)
* Add the above code, and Build
* Double-click both of the unit tests from Test Explorer. SyncTest will take you to the code; AsyncTest won't.

Related branches

Changed in nunit-vs-adapter:
status: New → Confirmed
status: Confirmed → Triaged
importance: Undecided → High
Revision history for this message
Charlie Poole (charlie.poole) wrote :

The fundamental problem is that we cannot locate the source code for the async method. I've updated the title to indicate this.

We use the DiaSession object provided by the explorer to get this information. For async, the Microsoft developers gave us a code snippet to work around the bug but that workaround stopped working with Update 2. We asked for a new solution back in April, but haven't received an answer yet.

Changed in nunit-vs-adapter:
milestone: none → 1.0
summary: - Double-clicking an async test from Test Explorer does not take you to
- source
+ No Source Available for Async Tests
Changed in nunit-vs-adapter:
assignee: nobody → Charlie Poole (charlie.poole)
milestone: 1.0 → 1.0rc1
Changed in nunit-vs-adapter:
status: Triaged → Fix Committed
Changed in nunit-vs-adapter:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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