ModernFormsNext.Testing 1.11.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ModernFormsNext.Testing --version 1.11.0
                    
NuGet\Install-Package ModernFormsNext.Testing -Version 1.11.0
                    
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="ModernFormsNext.Testing" Version="1.11.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ModernFormsNext.Testing" Version="1.11.0" />
                    
Directory.Packages.props
<PackageReference Include="ModernFormsNext.Testing" />
                    
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 ModernFormsNext.Testing --version 1.11.0
                    
#r "nuget: ModernFormsNext.Testing, 1.11.0"
                    
#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 ModernFormsNext.Testing@1.11.0
                    
#: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=ModernFormsNext.Testing&version=1.11.0
                    
Install as a Cake Addin
#tool nuget:?package=ModernFormsNext.Testing&version=1.11.0
                    
Install as a Cake Tool

ModernFormsNext.Testing

ModernFormsNext.Testing provides deterministic headless application tests over real framework controls, layout, input routing, focus, commands and rendering. A controlled clock drives the production animation scheduler. Scoped clipboard/lifecycle/settings services keep tests isolated.

using ModernFormsNext;
using ModernFormsNext.Testing;

using var host = ModernFormsTestHost.Create();
var form = new Form { Name = "MainForm" };
var save = form.Controls.Add(new Button { Name = "save", Dock = DockStyle.Bottom, Text = "Save" });

TestWindowHost window = host.Show(form, 400, 300);
window.Input.Click(save);
host.ProcessPendingWork();
ControlTreeSnapshot snapshot = window.CaptureTree();
using RenderedSnapshot rendered = window.CaptureRenderedSnapshot();

Run all host/UI operations and disposal on the creating thread; serialize tests within a process. The host opens no native window and never accesses the OS clipboard. Off-screen snapshots are caller-owned and depend on the actual font/rendering environment. Native IME, Android Activity recreation, OS activation/popup behavior, accessibility and device behavior still require separate integration tests. Navigation/virtualization testing follows their future production contracts.

ShowDialog uses real Form modality and exposes its result task. ActivePopup/Popups provide input and snapshots for real control popups. Native foreground rules are separate from these shared framework checks.

See the TestHost guide for supported input keys, timer/frame semantics, diagnostics, ownership, and examples.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
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.11.1 92 9/22/2026
1.11.0 94 9/20/2026