I have a series of unit tests that connect to an Azure Storage emulator. In the installer, my code checks to see if there is something listening on the emulator port, and if the StorageNotAvailable flag is not set.
In each of my tests, I have code ...
if ( StorageNotAvailable ) Assert.Inconclusive( "Storage emulator is not available" ) // where storage emulator is available, continue as normal
As expected, when the test returns void , it correctly reports in the Tester Explorer as "Non-Convertible".
When some asynchronous methods are used in the test, and the signature [TestMethod] returns Task , then the test is reported in TestExplorer as "Failed" instead of "Inconclusive".
How can I get the async method for a report as Inconclusive?
EDIT
Some additional details may be in order. Here are some sample tests that I put together to demonstrate the problem I am seeing.
[TestMethod] public void MyTestMethod() { Assert.Inconclusive( "I am inconclusive" ); } [TestMethod] public async Task MyTestMethodAsync() { Assert.Inconclusive( "I am an error" ); }



Some environment details may also be in order:
- Windows 10 x64 1703 Build 15063.608
- Visual Studio Enterprise 2017 15.3.5
- .NET 4.7.02046
- VS Extensions That May Be Relevant
- Microsoft Visual Studio Platform
- MSTest V2 Create Unit Test Extension
- IntelliTest MSTest V2 Extension
- MSTest V2 Templates
- Links to projects that may be relevant.
- Microsoft.VisualStudio.TestPlatform.TestFramework v14.0.0.0
- Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions v14.0.0.0
- NuGet projects that may be relevant
- MSTest.TestAdapter v1.1.18
- MSTest.TestFramework v1.1.18
- The goal of the project is the .NET Framework v4.7.
source share