FlakyTest.XUnit
1.0.5
See the version list below for details.
dotnet add package FlakyTest.XUnit --version 1.0.5
NuGet\Install-Package FlakyTest.XUnit -Version 1.0.5
<PackageReference Include="FlakyTest.XUnit" Version="1.0.5" />
paket add FlakyTest.XUnit --version 1.0.5
#r "nuget: FlakyTest.XUnit, 1.0.5"
// Install FlakyTest.XUnit as a Cake Addin #addin nuget:?package=FlakyTest.XUnit&version=1.0.5 // Install FlakyTest.XUnit as a Cake Tool #tool nuget:?package=FlakyTest.XUnit&version=1.0.5
FlakyTest.XUnit
Do you have some flaky tests? Are you using XUnit? Do you want to retry your flaky tests a few times before considering them failures? Heck yeah brother! (You should probably actually fix the test so it's not flaky, but sometimes you just don't have time!)
If you still want an easy way to mark a test or two (but no more than that!) as flaky, then this might be the package for you.
Usage
It probably can't get much easier to consume this functionality. If you're already used to decorating your test methods with [Fact]
you're almost there!
using FlakyTest.XUnit.Attributes;
[FlakyFact("this test is heckin flaky my dude, follow up to fix this in JIRA-1234", 42)]
public async Task WhenDoingThing_ShouldHaveThisResult()
{
// your test implementation which is sometimes flaky
}
The project requires the first string parameter flakyExplanation
to be not null/empty... cuz you really shouldn't be using this anyway. This can be used as a way to describe how/why the test is flaky, and perhaps leave a note and ticket for follow up to get the flakyness aspect of the test fixed.
The second parameter indicates how many times the test can "fail" before the test runner actually reports it as failure. The default value here (at the time of writing this) is 5 - meaning the test can fail 5 times prior to the runner reporting it as a failure. If the test passes on the first, fourth, or any test in between, it is immediately marked as successful to the runner.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- xunit.core (>= 2.4.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on FlakyTest.XUnit:
Repository | Stars |
---|---|
surrealdb/surrealdb.net
SurrealDB SDK for .NET
|
Version | Downloads | Last updated |
---|---|---|
2.4.10 | 72,829 | 1/30/2023 |
2.3.13 | 44,767 | 1/25/2023 |
2.2.5 | 308 | 1/23/2023 |
2.1.5 | 317 | 1/21/2023 |
2.0.4 | 313 | 1/15/2023 |
1.0.5 | 413 | 1/8/2023 |
1.0.4-prerelease | 154 | 1/8/2023 |
1.0.1-prerelease | 154 | 1/8/2023 |