ModernFormsNext.Testing
1.11.1
dotnet add package ModernFormsNext.Testing --version 1.11.1
NuGet\Install-Package ModernFormsNext.Testing -Version 1.11.1
<PackageReference Include="ModernFormsNext.Testing" Version="1.11.1" />
<PackageVersion Include="ModernFormsNext.Testing" Version="1.11.1" />
<PackageReference Include="ModernFormsNext.Testing" />
paket add ModernFormsNext.Testing --version 1.11.1
#r "nuget: ModernFormsNext.Testing, 1.11.1"
#:package ModernFormsNext.Testing@1.11.1
#addin nuget:?package=ModernFormsNext.Testing&version=1.11.1
#tool nuget:?package=ModernFormsNext.Testing&version=1.11.1
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 | Versions 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. |
-
net10.0
- ModernFormsNext (>= 1.11.1)
- ModernFormsNext.WindowKit (>= 1.11.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.