Table of Contents

Method GetAttachments

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll

GetAttachments(TContext)

Gets the attachments for the test. If the test framework did not collect attachments (or does not support attachments), then it should return null.

protected virtual ValueTask<IReadOnlyDictionary<string, TestAttachment>?> GetAttachments(TContext ctxt)

Parameters

ctxt TContext

The context that describes the current test

Returns

ValueTask<IReadOnlyDictionary<string, TestAttachment>>

Remarks

By default, this method returns Attachments from the current context. This method runs during Running and any exceptions thrown will contribute to test failure.