From c0c67256a02f56c6ad6f4eb48ec4aa80f467a8ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Tue, 30 Jun 2026 08:02:37 +0200 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20glossary=20weekly=20scan=20?= =?UTF-8?q?=E2=80=94=20add=208=20new=20terms=20(ITestFilter=20family,=20IT?= =?UTF-8?q?estHostLauncher=20family,=20PackagedApp,=20VideoRecorder)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add glossary entries for concepts introduced in the week of 2026-06-24: - ITestFilter: MSTest programmatic test-filtering interface (PR #8896) - TestFilterContext: metadata context passed to ITestFilter.Filter (PR #8896) - TestFilterProvider: assembly attribute that registers an ITestFilter (PR #8896) - TestFilterResult: readonly struct with Run/Drop/Skip decisions (PR #8896) - ITestHostHandle: lifecycle handle for custom-launched test hosts (PR #9454) - ITestHostLauncher: MTP extension point for custom host launch (PR #9454) - Microsoft.Testing.Extensions.PackagedApp: packaged-app deployment extension (PR #9454) - VideoRecorder: screen-recording MTP extension via ffmpeg (PR #9377) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/glossary.md | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/docs/glossary.md b/docs/glossary.md index ee16bc94c5..ac99042485 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -132,6 +132,18 @@ An intermediate artifact in the [Formal Verification (FV)](#formal-verification- An MSBuild property (`true`) that marks a project as an MTP test application. When set, the project builds into a self-contained test runner executable rather than a class library consumed by a separate test host. +### ITestFilter + +An MSTest interface (`Microsoft.VisualStudio.TestTools.UnitTesting.ITestFilter`) that enables programmatic test filtering, evaluated **before** any test type is loaded and before `[AssemblyInitialize]` or `[ClassInitialize]` runs. The single method is `TestFilterResult Filter(TestFilterContext context)`. Implement this interface and register it with `[assembly: TestFilterProvider(typeof(MyFilter))]` to include, drop, or skip tests based on categories, traits, priority, or name — without incurring type-loading cost. Exceptions thrown from `Filter` produce an error result (`UTA078`) rather than silently dropping tests. The filter instance is resolved once per source assembly and cached for the entire run. Introduced in [PR #8896](https://github.com/microsoft/testfx/pull/8896). See also [TestFilterContext](#testfiltercontext), [TestFilterProvider](#testfilterprovider), and [TestFilterResult](#testfilterresult). + +### ITestHostHandle + +An experimental MTP interface (`Microsoft.Testing.Platform.ITestHostHandle`, `[Experimental("TPEXP")]`) representing the lifecycle of a test host started by an [ITestHostLauncher](#itesthostlauncher). Exposes: `WaitForExitAsync(CancellationToken)`, `ExitCode`, `HasExited`, `Terminate`, `IDisposable`, and an optional `string? Identifier` for diagnostics (may be a container id, AUMID token, or `null` — intentionally not a numeric process id). Returned by `ITestHostLauncher.LaunchTestHostAsync`. Introduced in [PR #9454](https://github.com/microsoft/testfx/pull/9454). + +### ITestHostLauncher + +An experimental MTP interface (`Microsoft.Testing.Platform.ITestHostLauncher`, `[Experimental("TPEXP")]`) that lets an extension replace the default `Process.Start` used to start the out-of-process test host. Register via `ITestHostControllersManager.AddTestHostLauncher(...)`. The platform assembles all arguments, environment variables, and the IPC pipe, then delegates the actual launch to `LaunchTestHostAsync(TestHostLaunchContext, CancellationToken)`; the launcher returns an [ITestHostHandle](#itesthosthandle) and the platform resumes ownership of monitoring and exit-code reconciliation. At most one launcher may be registered per run. Motivating scenario: packaged Windows apps (UWP / WinUI) that require AUMID activation rather than `Process.Start`. See `docs/RFCs/017-TestHost-Launcher.md` and [PR #9454](https://github.com/microsoft/testfx/pull/9454). See also [Microsoft.Testing.Extensions.PackagedApp](#microsofttestingextensionspackagedapp). + ## J ### JSON-RPC Protocol @@ -210,6 +222,10 @@ A NuGet package (`Microsoft.Testing.Platform.AI`) that provides AI extensibility An experimental MTP extension (`Microsoft.Testing.Extensions.Logging`, `[TPEXP]`) that bridges Microsoft Testing Platform diagnostic logs to any `Microsoft.Extensions.Logging` provider (e.g., Console, Serilog, Application Insights, OpenTelemetry exporters). Register via `AddMicrosoftExtensionsLogging()` on `ITestApplicationBuilder`, passing either an existing `ILoggerFactory` or a configuration delegate for the logging builder. The minimum log level is bounded by the platform's effective diagnostic level; per-category filters in the `ILoggingBuilder` can narrow but not widen it. MTP core (`Microsoft.Testing.Platform`) does not depend on `Microsoft.Extensions.Logging`; this package provides an additive opt-in bridge only. Currently **experimental** — API surface may change without notice. See `docs/RFCs/013-Microsoft-Extensions-Bridges.md` for the design. +### Microsoft.Testing.Extensions.PackagedApp + +An experimental MTP extension (`Microsoft.Testing.Extensions.PackagedApp`, `[Experimental("TPEXP")]`, ships as `1.0.0-alpha`) that enables testing packaged Windows apps (UWP / WinUI) by deploying the test payload to an isolated directory and launching it via the [ITestHostLauncher](#itesthostlauncher) extension point, rather than a plain `Process.Start`. Register via `builder.AddPackagedAppDeployment()`. Full AUMID activation (for apps requiring the app identity manifest) is planned for a follow-up release. Introduced in [PR #9454](https://github.com/microsoft/testfx/pull/9454). See also [ITestHostLauncher](#itesthostlauncher). + ## N ### NopFilter @@ -282,6 +298,24 @@ The per-project configuration file for Microsoft.Testing.Platform, placed at the An abstract base class (`TestFramework.ForTestingMSTest.TestContainer`) in the internal [`TestFramework.ForTestingMSTest`](../test/Utilities/TestFramework.ForTestingMSTest) framework used to unit-test MSTest itself. Any class that inherits from `TestContainer` is treated as a test class; every `public` parameterless method on that class is treated as a test — no `[TestClass]` or `[TestMethod]` attributes are needed. The constructor runs before each test and `Dispose(bool)` runs after each test. This framework is used only in `test/UnitTests/TestFramework.UnitTests`; all other test projects in this repository use standard MSTest or MTP. +### TestFilterContext + +A sealed MSTest class (`Microsoft.VisualStudio.TestTools.UnitTesting.TestFilterContext`) passed to `ITestFilter.Filter()`. Exposes test metadata available **without loading the test type**. Always-populated: `FullyQualifiedName`, `DisplayName`, `MethodName`, `Source` (assembly file path). Optionally populated — parsed from the managed name with no reflection or type-load: `Namespace`, `ClassName`, `ManagedTypeName`, `ManagedMethodName`, `MethodArity`, `ParameterTypeFullNames`. Test metadata: `Categories`, `Traits`, `Priority`. Uses a parameterless constructor with mutable properties (no `init`) so new fields can be added additively in future releases without breaking existing callers. Introduced in [PR #8896](https://github.com/microsoft/testfx/pull/8896). See also [ITestFilter](#itestfilter). + +### TestFilterProvider + +An MSTest assembly-level attribute (`[assembly: TestFilterProvider(typeof(T))]` in `Microsoft.VisualStudio.TestTools.UnitTesting`) that registers an [ITestFilter](#itestfilter) implementation for the test assembly. `AllowMultiple = false` — applying more than one raises error `UTA079`. The filter type must be non-generic, non-abstract, implement `ITestFilter`, and have a public parameterless constructor; violations produce `UTA073`–`UTA077`. Introduced in [PR #8896](https://github.com/microsoft/testfx/pull/8896). See also [ITestFilter](#itestfilter). + +### TestFilterResult + +A readonly MSTest struct (`Microsoft.VisualStudio.TestTools.UnitTesting.TestFilterResult`) returned by `ITestFilter.Filter()` that declares the filtering decision for a test. Three static members: + +- `TestFilterResult.Run` — execute the test normally. +- `TestFilterResult.Drop` — silently exclude the test (zero `[AssemblyInitialize]` / `[ClassInitialize]` cost, no result emitted). +- `TestFilterResult.Skip(string reason)` — mark the test Ignored with the given reason (throws `ArgumentException` if `reason` is null, empty, or whitespace). + +The underlying `TestFilterAction` enum values are `Run = 0`, `Drop = 1`, `Skip = 2`. Introduced in [PR #8896](https://github.com/microsoft/testfx/pull/8896). See also [ITestFilter](#itestfilter). + ### TestNode A core MTP class (`Microsoft.Testing.Platform.Extensions.Messages.TestNode`) that represents a single test item — either discovered or executed. Each `TestNode` carries a unique `Uid` (`TestNodeUid`), a human-readable `DisplayName`, and a [PropertyBag](#propertybag) of typed properties (state, timing, file location, metadata, etc.). `TestNode` instances are published to the `IMessageBus` by test framework adapters during discovery and execution phases. @@ -308,6 +342,21 @@ An MTP component (`TreeNodeFilter.cs`) that evaluates filter expressions against ## V +### VideoRecorder + +An experimental MTP extension (`Microsoft.Testing.Extensions.VideoRecorder`, `[Experimental("TPEXP")]`, ships as `1.0.0-alpha`) that records the screen during a test run using an external **ffmpeg** process and attaches the produced video clips as session artifacts. Recording is **continuous** — not started/stopped per test — to avoid races with parallel tests: the extension runs a rolling segment mux throughout the session and losslessly slices per-test clips (or a single chaptered session video) from timing data after each test completes. + +| Option | Values | Description | +| --- | --- | --- | +| `--capture-video` | *(none)*, `on-failure`, `always` | Enable recording. Default retention: `on-failure` (keep only failing-test clips). | +| `--capture-video-granularity` | `test` (default), `session` | One clip per test, or one chaptered video for the whole session. | +| `--capture-video-source` | `screen` (default), `window` | Full screen, or the current-process window (Windows; falls back to screen on headless/CI). | +| `--capture-video-max-duration` | seconds | Rolling buffer cap — keep ~the last N seconds on disk. | +| `--capture-video-chapters` | `on` (default), `off` | Chapter bookmarks in the per-session video. | +| `--capture-video-args` | any string | Extra arguments forwarded to ffmpeg. | + +Register via `builder.AddVideoRecorderProvider()`. See `src/Platform/Microsoft.Testing.Extensions.VideoRecorder/DESIGN.md` for format and licensing notes. Introduced in [PR #9377](https://github.com/microsoft/testfx/pull/9377). + ### VSTest Microsoft's previous-generation test platform (`vstest.console.exe`, `Microsoft.TestPlatform.*`). MSTest v2 originally ran on top of VSTest. MTP is the modern successor to VSTest, offering better performance and a simplified extension model. From 63585b9a7a6bb01a5a8e58f6039c0ddb108c3fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Tue, 30 Jun 2026 10:59:45 +0200 Subject: [PATCH 2/2] Address review comments: fix namespaces, Skip outcome/exceptions, UTA codes, add MSTESTEXP notes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/glossary.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/glossary.md b/docs/glossary.md index ac99042485..aabbbf1fc5 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -134,15 +134,15 @@ An MSBuild property (`true