Method FromException
- Namespace
- Xunit.Runner.Common
- Assembly
- xunit.v3.runner.common.dll
FromException(Exception, string, string, string?, string?, string, string, decimal, string?, string[]?, DateTimeOffset?)
Creates a new ITestFailed constructed from an Exception object.
public static ITestFailed FromException(Exception ex, string assemblyUniqueID, string testCollectionUniqueID, string? testClassUniqueID, string? testMethodUniqueID, string testCaseUniqueID, string testUniqueID, decimal executionTime, string? output, string[]? warnings, DateTimeOffset? finishTime = null)
Parameters
exExceptionThe exception to use
assemblyUniqueIDstringThe unique ID of the assembly
testCollectionUniqueIDstringThe unique ID of the test collectioon
testClassUniqueIDstringThe (optional) unique ID of the test class
testMethodUniqueIDstringThe (optional) unique ID of the test method
testCaseUniqueIDstringThe unique ID of the test case
testUniqueIDstringThe unique ID of the test
executionTimedecimalThe execution time of the test (may be
nullif the test wasn't executed)outputstringThe (optional) output from the test
warningsstring[]The (optional) warnings that were recorded during test execution
finishTimeDateTimeOffset?The time when the test finished executing; defaults to UtcNow