Table of Contents

Class TestAssemblyStarting

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

Default implementation of ITestAssemblyStarting.

[JsonTypeID("test-assembly-starting")]
public sealed class TestAssemblyStarting : TestAssemblyMessage, IJsonDeserializable, ITestAssemblyStarting, ITestAssemblyMessage, IMessageSinkMessage, IJsonSerializable, IAssemblyMetadata
Inheritance
TestAssemblyStarting
Implements
Inherited Members
Extension Methods

Properties

AssemblyName

Gets the assembly name. May return a simple assembly name (i.e., "mscorlib"), or may return a fully qualified name (i.e., "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089").

public required string AssemblyName { get; set; }

Property Value

string

Remarks

Note: Will be UnsetStringPropertyValue if there was no value provided during deserialization.

AssemblyPath

Gets the on-disk location of the assembly under test.

public required string AssemblyPath { get; set; }

Property Value

string

Remarks

Note: Will be UnsetStringPropertyValue if there was no value provided during deserialization.

ConfigFilePath

Gets the full path of the configuration file name, if one is present. May be null if there is no configuration file.

public required string? ConfigFilePath { get; set; }

Property Value

string

Remarks

Note: Will be null if there was no value provided during deserialization.

Seed

Gets the seed value used for randomization. If null, then the test framework does not support getting or setting a randomization seed. (For stock versions of xUnit.net, support for settable randomization seeds started with v3.)

public required int? Seed { get; set; }

Property Value

int?

Remarks

Note: Will be null if there was no value provided during deserialization.

StartTime

Gets the date and time when the test assembly execution began.

public required DateTimeOffset StartTime { get; set; }

Property Value

DateTimeOffset

Remarks

Note: Will be MinValue if there was no value provided during deserialization.

TargetFramework

Gets the target framework that the assembly was compiled against. Examples: ".NETFramework,Version=v4.7.2", ".NETCoreApp,Version=v6.0". This information is read from TargetFrameworkAttribute on the test assembly, which is normally auto-generated (but could be missing or empty).

public required string? TargetFramework { get; set; }

Property Value

string

Remarks

Note: Will be null if there was no value provided during deserialization.

TestEnvironment

Gets a display string that describes the test execution environment. Examples: "32-bit .NET Framework 4.8.4220.0", "64-bit .NET Core 4.6.29220.03"

public required string TestEnvironment { get; set; }

Property Value

string

Remarks

Note: Will be UnsetStringPropertyValue if there was no value provided during deserialization.

TestFrameworkDisplayName

Gets a display string which describes the test framework and version number. Examples: "xUnit.net v3 0.1.0-pre.15", "xUnit.net 2.4.1"

public required string TestFrameworkDisplayName { get; set; }

Property Value

string

Remarks

Note: Will be UnsetStringPropertyValue if there was no value provided during deserialization.

Traits

Gets the trait values associated with this test assembly. If there are none, or the framework does not support traits, this should return an empty dictionary (not null).

public required IReadOnlyDictionary<string, IReadOnlyCollection<string>> Traits { get; set; }

Property Value

IReadOnlyDictionary<string, IReadOnlyCollection<string>>

Remarks

Note: Will be an empty dictionary if there was no value provided during deserialization.

Methods

Deserialize(IReadOnlyDictionary<string, object?>)

Override to deserialize the values in the dictionary into the message.

protected override void Deserialize(IReadOnlyDictionary<string, object?> root)

Parameters

root IReadOnlyDictionary<string, object>

The root of the JSON object

Serialize(JsonObjectSerializer)

Override to serialize the values in the message into JSON.

protected override void Serialize(JsonObjectSerializer serializer)

Parameters

serializer JsonObjectSerializer

The serializer to write values to.

ToString()

public override string ToString()

Returns

string