You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building tests and a registration is missing or some other issue prevents a test class from being instantiated for a given test case, a vanilla exception is thrown.
It would be ideal to have a more specific (custom?) exception that describes this scenario - which may even be used for additional filtering when reporting test results for example:
catch (Exception ex)
{
exceptionCallback?.Invoke(testCaseEnumerator.Current);
await DisposeOfTestInstance(testCaseEnumerator.Current);
testCaseEnumerator.Dispose();
var msg = $"Error resolving test from {testProvider.Test.FullName}";
Log.Logger.Fatal(ex, "{Message}", msg);
if (exceptionCallback is null) throw;
var testCaseEnumerationException = new TestCaseEnumerationException(ex, $"Failed to create test cases for {testProvider.Test.FullName}");
return new List<TestCaseExecutionResult>() { new(testCaseEnumerationException) };
}
Or something to that effect.
The text was updated successfully, but these errors were encountered:
When building tests and a registration is missing or some other issue prevents a test class from being instantiated for a given test case, a vanilla exception is thrown.
It would be ideal to have a more specific (custom?) exception that describes this scenario - which may even be used for additional filtering when reporting test results for example:
Or something to that effect.
The text was updated successfully, but these errors were encountered: