Table of Contents

Interface IXunitTestCollection

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

Represents a test collection from xUnit.net v3 based on reflection.

public interface IXunitTestCollection : ITestCollection, ITestCollectionMetadata
Inherited Members

Remarks

Test collections form the basis of the parallelization in xUnit.net v3. Test cases which are in the same test collection will not be run in parallel against sibling tests, but will run in parallel against tests in other collections. They also provide a level of shared context via ICollectionFixture<TFixture>.

Properties

BeforeAfterTestAttributes

Gets the IBeforeAfterTestAttributes attached to the test collection (and the test assembly).

IReadOnlyCollection<IBeforeAfterTestAttribute> BeforeAfterTestAttributes { get; }

Property Value

IReadOnlyCollection<IBeforeAfterTestAttribute>

ClassFixtureTypes

Gets a list of collection fixture types associated with the test collection.

IReadOnlyCollection<Type> ClassFixtureTypes { get; }

Property Value

IReadOnlyCollection<Type>

CollectionDefinition

Gets the type that this collection definition derived from, if it derives from one. Untyped collections are possible when test classes are decorated using CollectionAttribute(string) and there is no test collection class declared with the same name.

Type? CollectionDefinition { get; }

Property Value

Type

Remarks

This should only be used to execute a test collection. All reflection should be abstracted here instead for better testability.

CollectionFixtureTypes

Gets a list of collection fixture types associated with the test collection.

IReadOnlyCollection<Type> CollectionFixtureTypes { get; }

Property Value

IReadOnlyCollection<Type>

DisableParallelization

Determines whether tests in this collection runs in parallel with any other collections.

bool DisableParallelization { get; }

Property Value

bool

TestAssembly

Gets the test assembly this test collection belongs to.

IXunitTestAssembly TestAssembly { get; }

Property Value

IXunitTestAssembly

TestCaseOrderer

Gets the test case orderer for the test collection, if present.

ITestCaseOrderer? TestCaseOrderer { get; }

Property Value

ITestCaseOrderer