VSCode "Error processing launch options at field: program" popup when debugging an xunit test #3459
Description
opened on Apr 29, 2018
Steps to Reproduce:
- Setup a project with xunit:
using System;
using System.Reflection;
using Xunit;
public class Fact2Attribute : FactAttribute
{
public Fact2Attribute()
{
Type thisType = GetType();
MethodInfo theMethod = thisType.GetMethod("MyOtherMethod");
var result = theMethod.Invoke(this, null);
}
public void MyOtherMethod(string singleParam){}
}
[Fact2]
public void ATestMethod()
{
Assert.True(false);
}
- Compile and using Code lens press
Debug Test
Expected behavior
It should fail before the test runs as we are invoking MyOtherMethod
without a param. An appropriate message should be shown.
Actual behavior
I don't get any error messages in console. If I try and run test
rather than debug test
it seems to completely bypass the test so I end up with:
Total tests: 0. Passed: 0. Failed: 0. Skipped: 0
If I run dotnet test
I get the same result as run test
in code lens.
Versions:
dotnet 2.1.105
VS code 1.22.2
Omisharp 1.14.0
Ubuntu 16.04.4 LTS
Activity