fm.Extensions.Testing
10.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package fm.Extensions.Testing --version 10.0.0
NuGet\Install-Package fm.Extensions.Testing -Version 10.0.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="fm.Extensions.Testing" Version="10.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="fm.Extensions.Testing" Version="10.0.0" />
<PackageReference Include="fm.Extensions.Testing" />
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 fm.Extensions.Testing --version 10.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: fm.Extensions.Testing, 10.0.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 fm.Extensions.Testing@10.0.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=fm.Extensions.Testing&version=10.0.0
#tool nuget:?package=fm.Extensions.Testing&version=10.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
About
- Provides a MSTest base class for tests.
- Extends
TestMethodwith retry capability and graceful failure.
How to Use
TestsBase
Provides a TestContext and various helpers to read/write test files.
Example
[TestClass]
public sealed class ExampleTests : TestsBase
{
[TestMethod]
public void ExampleTest()
{
// Your test logic here.
}
}
TestMethodEx
RetryCount
Retries failed tests.
[TestMethodEx(RetryCount = 6), Description("This test will be executed 5 times and succeed.")]
public void RetryUntilPassesTest()
{
int executionCount = this.TestContext.GetProperty<int>("ExecutionCount", 1);
this.TestContext.WriteLine($"Current ExecutionCount: {executionCount:0}");
this.TestContext.SetProperty<int>("ExecutionCount", executionCount + 1);
executionCount.ShouldBe(5);
}
[TestMethodEx(RetryCount = 2), Description("This test will be executed 3 times and fail.")]
public void RetryUntilFailsTest()
{
int executionCount = this.TestContext.GetProperty<int>("ExecutionCount", 1);
this.TestContext.WriteLine($"Current ExecutionCount: {executionCount:0}");
this.TestContext.SetProperty<int>("ExecutionCount", executionCount + 1);
executionCount.ShouldBe(5);
}
RetryDelay
Waits the given amount of time between retries.
[TestMethodEx(RetryCount = 2, RetryDelay = 1_000),
Description("This test will be executed max. 3 times, we will wait 1s in between tries.")]
public void RetryAndWaitTest()
{
// My test...
}
TreatFailedAsInconclusive
If the test fails, it will be treated as Inconclusive.
[TestMethodEx(TreatFailedAsInconclusive = true)]
public void TreatFailedAsInconclusiveTest()
{
Assert.Fail("This test fails, but will be treated as inconclusive.");
}
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- MSTest.TestFramework (>= 4.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on fm.Extensions.Testing:
| Package | Downloads |
|---|---|
|
fm.Extensions.Testing.DependencyInjection
Provides a MSTest base class for tests based on IServiceProvider. Use common Startup.cs patterns like ConfigureServices(...), ConfigureConfiguration(...) and ConfigureLogging(...) to setup your tests. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0 | 202 | 11/26/2025 |
| 10.0.0 | 324 | 11/13/2025 |
| 9.0.0 | 237 | 10/8/2025 |
| 8.2.1 | 302 | 4/22/2025 |
| 8.2.0 | 172 | 4/19/2025 |
| 8.1.0 | 228 | 4/19/2025 |
| 8.0.0 | 216 | 11/15/2024 |
| 7.0.2 | 230 | 7/19/2024 |
| 7.0.1 | 243 | 4/5/2024 |
| 7.0.0 | 219 | 3/27/2024 |
| 6.2.0 | 349 | 11/5/2023 |
| 6.1.0 | 310 | 6/20/2023 |
| 6.0.0 | 405 | 3/4/2023 |
Loading failed
BREAKING: Target .NET 10