MScottFord.Forks.NUnit.Maui.Runner
2.0.2
dotnet add package MScottFord.Forks.NUnit.Maui.Runner --version 2.0.2
NuGet\Install-Package MScottFord.Forks.NUnit.Maui.Runner -Version 2.0.2
<PackageReference Include="MScottFord.Forks.NUnit.Maui.Runner" Version="2.0.2" />
<PackageVersion Include="MScottFord.Forks.NUnit.Maui.Runner" Version="2.0.2" />
<PackageReference Include="MScottFord.Forks.NUnit.Maui.Runner" />
paket add MScottFord.Forks.NUnit.Maui.Runner --version 2.0.2
#r "nuget: MScottFord.Forks.NUnit.Maui.Runner, 2.0.2"
#:package MScottFord.Forks.NUnit.Maui.Runner@2.0.2
#addin nuget:?package=MScottFord.Forks.NUnit.Maui.Runner&version=2.0.2
#tool nuget:?package=MScottFord.Forks.NUnit.Maui.Runner&version=2.0.2
NUnit MAUI Runner
Runs NUnit tests inside a .NET MAUI app, on a device, simulator or emulator, and reports the results in the app or streams them over TCP for a build to collect.
This is a fork. It exists to publish a build targeting .NET 10 and MAUI 10.
The original is JaneySprings/NUnit-MAUI-Runner by Nikita Romanov, by way of Abhirasmanu-Trimble/NUnit-MAUI-Runner. Only the package id is prefixed: the assembly name and namespaces are unchanged, so code written against the upstream package needs no edits beyond the package reference.
Changes here are not offered upstream. If the upstream project picks .NET 10 up, use that instead.
Supported platforms
net10.0-android and net10.0-ios. Android 5.0 (API 21) or higher, iOS 12.2 or higher.
Installation
dotnet add package MScottFord.Forks.NUnit.Maui.Runner
Usage
Create a configuration class:
class RunnerConfig : IRunnerConfiguration {
public TestOptions ProvideOption() {
return new TestOptions() {
// Paste NUnit options here
// AutoRun = true
};
}
public IEnumerable<Assembly> ProvideAssemblies() {
return new List<Assembly> {
// Paste your assemblies with tests here
};
}
}
Add the NUnit app and your configuration class to MauiProgram.cs:
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<NUnit.Maui.Runner.App>()
.Services.AddSingleton<IRunnerConfiguration, RunnerConfig>();
return builder.Build();
TestOptions also covers running the suite on launch (AutoRun), exiting when it finishes
(TerminateAfterExecution), writing an XML result file, and streaming results to a TCP
listener (TcpWriterParameters) so a build can collect them.
Source, issues and contributing
github.com/mscottford/NUnit-MAUI-Runner — see the repository README for how to build it and run its own tests.
Licence
MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-android36.0 is compatible. net10.0-ios26.0 is compatible. |
-
net10.0-android36.0
- CommunityToolkit.Mvvm (>= 8.4.2)
- Microsoft.Maui.Controls (>= 10.0.20)
- Microsoft.Maui.Controls.Compatibility (>= 10.0.20)
-
net10.0-ios26.0
- CommunityToolkit.Mvvm (>= 8.4.2)
- Microsoft.Maui.Controls (>= 10.0.20)
- Microsoft.Maui.Controls.Compatibility (>= 10.0.20)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.