No Source Available for Async Tests
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()
{
}
[Test]
public void SyncTest()
{
}
}
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 |
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 |
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.