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
ex
ExceptionThe exception to use
assemblyUniqueID
stringThe unique ID of the assembly
testCollectionUniqueID
stringThe unique ID of the test collectioon
testClassUniqueID
stringThe (optional) unique ID of the test class
testMethodUniqueID
stringThe (optional) unique ID of the test method
testCaseUniqueID
stringThe unique ID of the test case
testUniqueID
stringThe unique ID of the test
executionTime
decimalThe execution time of the test (may be
null
if the test wasn't executed)output
stringThe (optional) output from the test
warnings
string[]The (optional) warnings that were recorded during test execution
finishTime
DateTimeOffset?The time when the test finished executing; defaults to UtcNow