TonyHallett.WPFExtras.TestTools
1.0.0
dotnet add package TonyHallett.WPFExtras.TestTools --version 1.0.0
NuGet\Install-Package TonyHallett.WPFExtras.TestTools -Version 1.0.0
<PackageReference Include="TonyHallett.WPFExtras.TestTools" Version="1.0.0" />
<PackageVersion Include="TonyHallett.WPFExtras.TestTools" Version="1.0.0" />
<PackageReference Include="TonyHallett.WPFExtras.TestTools" />
paket add TonyHallett.WPFExtras.TestTools --version 1.0.0
#r "nuget: TonyHallett.WPFExtras.TestTools, 1.0.0"
#:package TonyHallett.WPFExtras.TestTools@1.0.0
#addin nuget:?package=TonyHallett.WPFExtras.TestTools&version=1.0.0
#tool nuget:?package=TonyHallett.WPFExtras.TestTools&version=1.0.0
Helpers for testing WPF.
SlnConventionExePathFinder
public static string GetPath(Assembly fromAssembly, Assembly exeAssembly)
Provides the path to an exe file given a specific solution directory structure. This allow a test to provide its own assembly and get the exe to pass to a UI testing framework, such as FlaUI or WPFPilot.
e.g given fromAssembly
"\TonyHallett.WPFExtras\TonyHallett.WPFExtras.UITests\bin\Debug\net10.0-windows\TonyHallett.WPFExtras.UITests.dll"
and exe Assembly with name TonyHallett.WPFExtras.TestHost
will replace the directory, \TonyHallett.WPFExtras.UITests, in the path above with _\TonyHallett.WPFExtras.TestHost_ and have the exe file name as TonyHallett.WPFExtras.TestHost.exe
resulting in
`\TonyHallett.WPFExtras\TonyHallett.WPFExtras.TestHost\bin\Debug\net10.0-windows\TonyHallett.WPFExtras.TestHost.exe"
Note that this helper is used by TonyHallett.WPFExtras.TestTools.WPFPilot SlnConventionAppDriverWindowLauncher which in turn is
used by the base NUnit test class of TonyHallett.WPFExtras.TestTools.WPFPilot.NUnit.
SlnConventionAppDriverWindowLauncher launches an app that uses TestHostApp.ShowWindow.
public abstract class SlnConventionWPFPilotTestBase<TWindow> where TWindow : Window
{
protected AppDriver AppDriver { get; private set; } = null!;
[SetUp]
public void SetUp()
=> AppDriver = SlnConventionAppDriverWindowLauncher.LaunchWindow<TWindow>(GetType().Assembly);
[TearDown]
public void TearDown() => AppDriver.Dispose();
}
TestHostApp.ShowWindow(StartupEventArgs e)
A helper to be used from WPF Applications to show a window by app argument --window=FullyQualifiedNameOfWindow.
The windows are tested by a UI testing framework, such as FlaUI or WPFPilot.
Activator.CreateInstance is used.
public partial class App : Application
{
public App()
{
Startup += (_, e) => TestHostApp.ShowWindow(e);
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. net10.0-windows7.0 is compatible. |
-
net10.0-windows7.0
- No dependencies.
-
net8.0-windows7.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TonyHallett.WPFExtras.TestTools:
| Package | Downloads |
|---|---|
|
TonyHallett.WPFExtras.TestTools.WPFPilot
Helpers for WPFPilot |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 107 | 9/7/2026 |