Table of Contents

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 Exception

The exception to use

assemblyUniqueID string

The unique ID of the assembly

testCollectionUniqueID string

The unique ID of the test collectioon

testClassUniqueID string

The (optional) unique ID of the test class

testMethodUniqueID string

The (optional) unique ID of the test method

testCaseUniqueID string

The unique ID of the test case

testUniqueID string

The unique ID of the test

executionTime decimal

The execution time of the test (may be null if the test wasn't executed)

output string

The (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

Returns