Table of Contents

Method TryGetTestMetadata

Namespace
Xunit.Runner.Common
Assembly
xunit.v3.runner.common.dll

TryGetTestMetadata(string, bool)

Attempts to retrieve ITestMetadata from the cache (and optionally remove it).

public ITestMetadata? TryGetTestMetadata(string testUniqueID, bool remove = false)

Parameters

testUniqueID string

The unique ID of the test to retrieve.

remove bool

Set to true to remove the metadata after retrieval.

Returns

The cached metadata, if present; or null if there isn't any.

TryGetTestMetadata(ITestMessage)

Attempts to retrieve ITestMetadata from the cache.

public ITestMetadata? TryGetTestMetadata(ITestMessage message)

Parameters

message

The message that indicates which metadata to retrieve.

Returns

The cached metadata, if present; or null if there isn't any.