Microsoft.Testing.Extensions.VideoRecorder 1.0.0-alpha.26363.8

Prefix Reserved
This is a prerelease version of Microsoft.Testing.Extensions.VideoRecorder.
dotnet add package Microsoft.Testing.Extensions.VideoRecorder --version 1.0.0-alpha.26363.8
                    
NuGet\Install-Package Microsoft.Testing.Extensions.VideoRecorder -Version 1.0.0-alpha.26363.8
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.Testing.Extensions.VideoRecorder" Version="1.0.0-alpha.26363.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Testing.Extensions.VideoRecorder" Version="1.0.0-alpha.26363.8" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.Testing.Extensions.VideoRecorder" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.Testing.Extensions.VideoRecorder --version 1.0.0-alpha.26363.8
                    
#r "nuget: Microsoft.Testing.Extensions.VideoRecorder, 1.0.0-alpha.26363.8"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Microsoft.Testing.Extensions.VideoRecorder@1.0.0-alpha.26363.8
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Microsoft.Testing.Extensions.VideoRecorder&version=1.0.0-alpha.26363.8&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.Testing.Extensions.VideoRecorder&version=1.0.0-alpha.26363.8&prerelease
                    
Install as a Cake Tool

Microsoft.Testing.Extensions.VideoRecorder

Microsoft.Testing.Extensions.VideoRecorder is an extension for Microsoft.Testing.Platform that records the screen while your tests run and attaches the captured videos to the test session as artifacts.

Microsoft.Testing.Platform is open source. You can find Microsoft.Testing.Extensions.VideoRecorder code in the microsoft/testfx GitHub repository.

Install the package

dotnet add package Microsoft.Testing.Extensions.VideoRecorder

About

⚠️ Experimental: This extension is currently experimental. The API, CLI options and on-disk format may change in future releases without notice.

This package extends Microsoft.Testing.Platform with screen recording driven by an external ffmpeg process (the only engine that is cross-platform and covers OS screen capture). The screen is recorded continuously for the whole run as a rolling sequence of short segments, and the per-test clips (or a single chaptered session video) are cut from those segments afterwards using each test's timing — so recorded tests can run in parallel and there is no per-test start/stop race.

Prerequisites

ffmpeg must be available — either on the PATH or via an explicit path (VideoRecorderOptions.FfmpegPath). On Windows the recorder uses gdigrab, on macOS avfoundation, on Linux x11grab.

Usage

Recording is opt-in per run. Enable it with --capture-video:

# Record, keeping the video only if a test fails (default). One video per test.
yourtests --capture-video

# Record the whole run into a single chaptered video instead of one per test
yourtests --capture-video always --capture-video-granularity session

# Long run: keep only the last 10 minutes of footage to bound disk usage
yourtests --capture-video always --capture-video-max-duration 600

Command-line options

Option Values Description
--capture-video (none), on-failure, always Enable recording. Retention: on-failure (default — keep only failing tests' footage) or always.
--capture-video-granularity test (default), session One video per test, or one chaptered video for the whole run.
--capture-video-source screen (default), window Full screen, or just the current process window (Windows; falls back to full screen elsewhere).
--capture-video-max-duration seconds Rolling buffer: keep ~the last N seconds to bound disk usage on long runs.
--capture-video-chapters on (default), off Chapter bookmarks in the per-session video.
--capture-video-args any string Extra arguments passed to the underlying recorder (ffmpeg), as output/encoding options.

Programmatic configuration

using Microsoft.Testing.Extensions;

testApplicationBuilder.AddVideoRecorderProvider(options =>
{
    options.FfmpegPath = @"C:\tools\ffmpeg\bin\ffmpeg.exe"; // optional; defaults to PATH lookup
    options.Format = VideoRecorderFormat.Mp4H264;           // or WebMVp9 (royalty-free)
    options.Granularity = VideoCaptureGranularity.PerTest;  // PerTest (default) / PerSession
    options.PersistMode = VideoRecorderPersistenceMode.OnFailure; // or Always
});

Licensing note

The default Mp4H264 format uses libx264, which is GPL in most ffmpeg builds and H.264 carries patent fees — fine when you bring your own ffmpeg on PATH. A royalty-free WebMVp9 format is provided for any scenario where an ffmpeg binary is bundled/redistributed.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-alpha.26363.8 44 7/13/2026
1.0.0-alpha.26358.12 64 7/8/2026
1.0.0-alpha.26357.13 52 7/7/2026