| Metadata | Value |
|---|---|
| Status | Current implementation baseline (scoped) |
| Baseline revision | c5e1f5c613fa02ffa507db333e4702da6c97e488 |
| Source-inspected | 2026-10-09 |
| Assurance | Source inspection and existing-test mapping only; no tests executed |
See the specification guide and MSTest architecture. “Shall” below describes the inspected implementation, not unimplemented RFC intent. Every evidence entry identifies source inspected and existing tests located; it is not a passing conformance result. No release branch, packed consumer, target-framework matrix or servicing policy was validated. Stable identifiers can be used in follow-up changes without turning this document into an API catalog.
MSTest's native MTP registration shall route discovery/run requests directly to the neutral engine,
publishing nodes through its own sink/recorder. VSTest shall retain its separate discoverer/executor entry points.
Checked: registration, request dispatch and model conversion in MSTestTestFramework,
MSTestEngine and converter.
Existing tests: MSTestTestNodeConverterTests, MtpUnitTestElementSink_PublishesDiscoveredTestNode, MtpTestResultRecorder_RecordResult_PublishesResultNodeAndReturnsFailedFlag.
Excludes host protocol/exit aggregation, all capability/session races, and claimed byte-for-byte bridge parity.
Ordinary C# test methods shall require an attributed eligible container and an accessible, nonabstract instance method
with a supported return shape (non-async void, Task, or nongeneric ValueTask).
DiscoverInternals shall permit internal classes/methods; private methods remain ineligible.
F# modules shall use the dedicated static-method exception.
Checked: TypeValidator and
TestMethodValidator.
Existing tests: TypeValidatorTests, IsValidTestClassShouldNotInferCSharpContainersFromTestMethods; TestMethodValidatorTests, IsValidTestMethodShouldReturnTrueForStaticMethodsOnFSharpModules, IsValidTestMethodShouldReturnFalseAndReportTargetedWarningForGenericValueTaskReturnType.
Excludes the generic type-inference matrix, by-ref invocation and generated-descriptor eligibility.
TestPropertyAttribute shall be subclassable and applicable multiple times to methods/classes.
Discovery shall carry properties as traits; filter property names not recognized as built-ins shall be looked up in traits.
Checked: attribute,
TypeEnumerator and native filter.
Existing tests: TestPropertyAttributeTests, GetTestMethodInfoShouldAddPropertiesFromContainingClassCorrectly; MSTestTestNodeConverterTests, ToDiscoveredTestNode_AddsCategoriesAndTraitsAsMetadata.
Excludes VS UI queries, logger/TRX schema fidelity and duplicate-key precedence across every host.
Fully qualified name and identity filters shall select matching neutral elements during discovery and execution,
including execution reconstructed from VSTest cases without local adapter payload.
Checked: TestMethodFilter and
source execution.
Existing tests: TestCaseFilteringTests, FilterByFullyQualifiedNameSelectsExactlyTheMatchingTestDuringExecution, FilterByIdSelectsExactlyTheMatchingTestDuringDiscovery.
Excludes an exhaustive grammar/escaping/tree-node/UID combination matrix and in-test ITestFilter policy.
The default TestMethodAttribute.ExecuteAsync shall invoke ITestMethod.InvokeAsync and return its result.
Custom method attributes may override execution; a custom class attribute may select the method executor.
Checked: TestMethodAttribute,
TestClassAttribute and runner.
Existing tests: LegacyExtensibilityTests, CustomTestMethodAndClassAttributesReturnEveryExecutionResult, CustomTestMethodAttributeComposesWithDataRows.
Excludes custom executors that violate context/lifecycle contracts and compatibility with old synchronous overrides.
For the ordinary initialized instance path, inherited test initialization shall run base-first;
test cleanup shall run derived-first, with subsequent cleanup methods stopped by an earlier cleanup failure.
Assembly/class fixtures shall be managed independently of per-invocation lifecycle.
Checked: TestMethodInfo.Lifecycle and
ClassCleanupManager.
Existing tests: LegacyLifecycleObjectModelTests, LifecycleInheritanceModes_HaveExactPerTestObjectModelMessages; ClassCleanupManagerTests, AssemblyCleanupRunsAfterAllTestsFinishEvenIfWeScheduleTheSameTestMultipleTime.
Excludes the complete fixture-inheritance, initialization-failure, global-fixture, disposal and cancellation matrix.
Framework ITestDataSource rows shall supply invocation arguments; Auto unfolding shall defer to assembly policy,
normally unfolding, while explicit Fold shall retain a parent discovery element.
Folded execution shall clone per-row test context and still produce row results.
An empty source shall fail by default, with ConsiderEmptyDataSourceAsInconclusive permitting an inconclusive result.
Checked: AssemblyEnumerator and
TestMethodRunner.DataRow.
Existing tests: LegacyExtensibilityTests, FoldedCustomTestDataSourceDiscoversOneParentAndExecutesTwoRows, DynamicDataPropertyMethodAndExternalSourcesExecute.
Excludes the complete data serialization/duplicate-name fallback matrix and aggregate folded-row outcome policy.
The name-only DynamicData constructor shall select automatic source-kind detection, not property-only lookup.
Supported sources include static properties, methods and fields; explicit declaring types and display-name callbacks are supported.
Checked: DynamicDataAttribute.
Existing tests: DynamicDataAttributeTests, GetDataShouldReadDataFromFieldInAutoDetectMode, GetDisplayNameShouldReturnDisplayNameWithDynamicDataDisplayNameInDifferentClass; LegacyDynamicDataBehaviorTests, DynamicDataSourcesInheritanceDisplayNamesAndOverloadsExecute.
Excludes full member-overload resolution, source arguments, generic inference and trimming preservation.
Legacy DataSourceAttribute execution shall obtain adapter data rows and expose each through TestContext.DataRow,
rather than treating it as framework ITestDataSource argument data. Its backing provider implementation is .NET Framework-only.
Checked: DataSourceAttribute,
TestMethodRunner.DataSource and provider.
Existing tests: DataSourceTests, TestDataSourceFromAppConfig; DesktopTestDataSourceTests.
Excludes database/OleDb availability, provider-specific behavior and every conflicting-data-attribute combination.
The parallelizable set shall be chunked by class or by element according to ExecutionScope.
Configured worker/scope values shall override assembly values; configured/attribute zero workers normalize to processor count.
DoNotParallelize elements shall run in the sequential tail after the parallel set drains.
Unfolded rows may therefore run independently at method scope; folded rows share one scheduled element.
Checked: assembly settings,
source execution and parallel execution.
Existing tests: ParallelExecutionTests, AllMethodsShouldRunInParallel, DoNotParallelizeTestRunsAfterAllParallelizableTests; MSTestSettingsTests, ParallelizationWorkersShouldBeSetToProcessorCountWhenSetToZero.
Excludes host process scheduling, guaranteed speedup and a nonexistent ExecutionScope.Custom.
Resource names shall compare ordinally and case-sensitively. Readers may coexist; writers shall exclude other holders.
A chunk shall acquire its union of keys in sorted order, using the strongest declared mode per key, and release in reverse order.
Class-level scheduling therefore widens method locks to the class chunk. Waiting for a lock consumes a worker.
Checked: ResourceLockManager and parallel scheduler.
Existing tests: ResourceLockManagerTests, GetChunkLocks_ReadWriteWinsOverRead_ForSameKey; ResourceLockExecutionTests, ResourceLock_UnderClassLevelScope_LocksWholeClassChunk_AndMergesModes.
Excludes automatic resource access detection, cross-process locks, lock-aware dispatch and undeclared conflicting accesses.
Resolved prerequisites shall complete before dependents run. A nonpassing prerequisite shall skip its dependents
unless the merged declarations permit proceeding. Unmatched selected-run targets shall warn and be ignored.
Real cycle members shall fail; class-projection-only cycles shall demote affected tests to sequential ordering.
Configured MTP JSON chains/nodes shall merge with attribute declarations rather than overriding them.
Checked: graph,
coordinator and settings parser.
Existing tests: TestDependencyGraphTests, Build_WhenADependencyMatchesNoTestInTheRun_WarnsAndIgnoresTheEdge; TestDependencyExecutionTests, DependsOn_WhenAPrerequisiteFails_SkipsDependentsTransitively_ButHonorsProceedOnFailure, DependencyConfiguration_OrdersTestsThatDeclareNoAttribute.
Excludes automatic inclusion of filtered prerequisites, row-to-row matching and cross-assembly dependencies.
XML shall recognize RunSettings with MSTest or its MSTestV2 alias.
On the native configuration path, providing both a JSON mstest section and an XML MSTest section shall be rejected.
An XML file without an MSTest section may coexist with JSON MSTest configuration.
Checked: MSTestSettings.Configuration.
Existing tests: MSTestSettingsTests, PopulateSettingsShouldInitializeSettingsFromMSTestV2Section; ConfigurationSettingsTests, TestConfigJson_AndRunSettingsWithoutMstest_OverrideRunConfigration.
Excludes the MTP configuration-provider precedence matrix and schema enforcement by editors.
Explicit JSON/XML timeout settings shall be strictly positive milliseconds; zero/negative values shall warn and be ignored.
Omission shall retain the no-timeout default. Method attributes shall override configured timeouts.
Dedicated global-test fixture timeouts shall fall back to corresponding test-initialize/cleanup settings when unset.
Checked: JSON parser,
XML parser, fixture timeout selection and TimeoutInfo.
Existing tests: MSTestSettingsTests, ConfigJson_WithZeroTimeout_GettingAWarningAndTimeoutIsNotSet, GlobalFixtureTimeout_WhenDedicatedKeyNotSet_FallsBackToSharedTestKey; LegacyTimeoutBehaviorTests, TimeoutExpiration_CancelsTestContextTokenAndAllowsBackgroundOutput.
Excludes guaranteed termination of noncooperative user code, all timeout/cancel races and the full STA/framework-abort matrix.
MSTest settings shall default MapNotRunnableToFailed and TreatDiscoveryWarningsAsErrors to true,
and MapInconclusiveToFailed to false. Mapping an execution outcome shall not imply every invalid signature is discovered as a runnable test.
Checked: MSTestSettings and method validator.
Existing tests: MSTestSettingsTests, MapNotRunnableToFailedIsByDefaultTrueWhenNotSpecified, TreatDiscoveryWarningsAsErrorsShouldBeTrueByDefault.
Excludes a complete host outcome/exit-code mapping table and classification of every discovery warning.
Executing tests shall receive a unique, lazily created scratch directory when requested; fixture contexts shall not create one.
Disposal shall best-effort delete passing-test directories, retaining nonpassing tests, result attachments under the directory
and explicit MSTEST_TEST_TEMP_DIRECTORY_RETAIN=1/true requests. Creation shall not change process current directory.
Checked: creation
and cleanup.
Existing tests: PerTestTempDirectoryTests, TestTempDirectory_IsUnique_CleansUpOnPass_And_RetainsOnFailure, TestTempDirectory_IsRetained_OnPass_WhenResultFileRegisteredUnderIt.
Excludes bounded disposal time on stalled filesystems and availability on UWP/WinUI; retry/diagnostic retention has additional rules.
Assert.That shall expose a singleton for C# extension methods. Custom assertion authors can throw AssertFailedException;
this does not automatically enroll their failures in a soft scope.
Checked: Assert.
Existing tests: LegacyExtensibilityTests, CustomAssertExtensionsReportExactPassesAndFailures.
Excludes a built-in fluent chaining protocol and a public soft-failure reporting API.
Reportable assertion failures inside Assert.Scope() shall collect until disposal, throwing the original single failure
or an AssertFailedException with an aggregate inner exception for multiple failures. Nested scopes shall be rejected.
Fail, Inconclusive and parameter validation shall remain hard; nullable/type postconditions are not enforced in scoped mode.
Checked: AssertScope and Assert.
Existing tests: AssertTests.ScopeTests, Scope_MultipleFailures_CollectsAllErrors, Scope_NestedScope_ThrowsInvalidOperationException, Scope_AssertIsNotNull_IsSoftFailure.
Excludes safe use of value-returning failed assertions, arbitrary worker execution-context suppression and future hard-assert opt-ins.
The structured formatter shall order prefix/summary, optional user message, evidence blocks and optional call-site expression,
separating evidence/expression blocks with blank lines. Expected/actual text shall also be carried on assertion exceptions when supplied.
Checked: StructuredAssertionMessage and Assert.
Existing tests: StructuredAssertionMessageTests, Format_FullMessage_CorrectLayout, WithExpectedAndActual_SetsProperties.
Excludes a universal wording guarantee for all legacy/Assert.That methods and RFC 012's unimplemented truncation settings.
Enabled supported-runtime capture shall record at most three assertion failures per execution attempt,
using version-1 JSON with bounded messages/values, active tests and stack frames.
Passing-test finalization shall discard its captured snapshots; nonpassing results shall attach available artifacts.
Checked: capture/finalization
and writer;
the schema remains the payload reference.
Existing tests: AssertionFailureDiagnosticsTests, CaptureShouldLimitAssertionFailuresPerAttempt, CaptureShouldBeDiscardedWhenTestPasses; acceptance test, AssertionFailureDiagnostics_WhenEnabled_AttachesPersistedArtifactToFailedTest.
Excludes local-variable inspection, suppressed-execution-context attribution, UWP/WinUI/browser/WASI/NativeAOT and cross-platform metric accuracy.
MSTest.Sdk shall default to the MTP runner and use the VSTest targets when UseVSTest=true.
IsTestApplication=false shall distinguish a library; NativeAOT shall add source generation, otherwise it is opt-in.
SDK source generation on .NET Standard shall fail with a runtime-hook availability diagnostic.
Checked: Sdk.targets,
ClassicEngine.targets and NativeAOT.targets.
Existing tests: SdkTests, SettingIsTestApplicationToFalseReducesAddedExtensionsAndMakesProjectNotExecutable; SourceGenerationNonAotTests, MSTestSdk_SourceGenerationOptIn_RejectsNetStandardTestLibrary.
Excludes every profile/extension/CPM/SDK-layering permutation and compatibility of independently versioned installed packages.
Reflection-free generation shall register materializable attributes, supported invocation delegates and resolvable dynamic-data accessors.
Complete entries shall be authoritative; missing entries/general reflection contracts shall retain fallback.
Native MTP descriptor discovery shall bypass method enumeration only for supported descriptors, retaining fallback when incomplete.
Unsupported reflection-free shapes shall surface applicable AOTSG0001–AOTSG0005 diagnostics.
Checked: generator,
model builder and runtime operations.
Existing tests: generator tests, Generator_DeclaresDescriptorSupportOnlyForBoundedSynchronousSubset, Generator_EmitsDynamicDataAccessor_ForPropertySource; runtime tests, TryGetTestMethodDescriptors_RetainsPerMethodFallbackWhenRegistrationIsIncomplete.
Excludes universal reflection elimination, generated source locations and guaranteed recovery of omitted classes through trimming roots.
The resource-lock analyzer shall report bare literal keys on attributed classes/methods and accept shared constants,
without implementing runtime synchronization itself.
Checked: PreferConstantForResourceLockAnalyzer, MSTEST0073.
Existing tests: PreferConstantForResourceLockAnalyzerTests, WhenResourceKeyIsBareLiteralOnMethod_Diagnostic, WhenResourceKeyIsUserConstant_NoDiagnostic.
Excludes the complete analyzer/code-fix catalog, configured severities, all languages and proof that constants actually identify the same resource.
TestRun.Current shall start with a non-null empty snapshot. The runner shall publish the
host-filter-selected planned tests for a source before assembly initialization and retain that
snapshot until replacement in the same process/AppDomain. Subsequent programmatic filtering,
dependency failures, skips and cancellation can prevent planned tests from executing.
The planned snapshot shall not be interpreted as running/completed state or cleanup-time proof
that a test actually ran.
Checked: TestRun,
UnitTestRunner and
source execution.
Existing tests: TestRunInfoTests,
TestRunCurrentIsNeverNull, SetCurrentNullResetsToEmpty, CreateFromPopulatesCategoriesAndProperties,
PlannedTestCopiesInputCollections.
Excludes executed fixture-visibility and multi-source/AppDomain conformance, deep immutability,
and future running/completed snapshots or events. See RFC 014.
The scoped baseline still lacks exhaustive contracts for public overload/source compatibility, assertion equivalence/diff/formatter semantics, discovery serialization/IDs, row metadata precedence, ignore/filter-provider behavior, lifecycle error and cancellation propagation, retry aggregation, output capture modes, deployment/assembly resolution, UI/STA/context flow, generated metadata completeness, trim/AOT preservation, SDK/extension composition and cross-version host/package interoperability. Historical proposals in the RFC directory are not substitutes for those implementation-backed contracts.