TestsSûr100100/100
Flaky Test Detector (.NET)
Detect flaky tests by scanning recent AzDo CI builds for test failures recurring across multiple unrelated PRs. Use when investigating intermittent failures, CI instability, deciding which tests to quarantine, or checking if RunTestCasesInSequence no-ops are causing parallel-safety issues.
ou envoie-le directement à ton agent.
Installer dans ton projet
$ curl -fsSL https://arboristhree.xyz/cli/install-skill.mjs -o /tmp/arboris-install-skill.mjs && node /tmp/arboris-install-skill.mjs flaky-test-detector__dotnet-dotnet__src-fsharp-github-skills-c4c6bc9f223c.NET
dotnet/dotnet
Contenu à copier
---
name: flaky-test-detector
description: "Detect flaky tests by scanning recent AzDo CI builds for test failures recurring across multiple unrelated PRs. Use when investigating intermittent failures, CI instability, deciding which tests to quarantine, or checking if RunTestCasesInSequence no-ops are causing parallel-safety issues."
metadata:
origin: .NET
author: fsharp-team
version: "1.0"
---
# Flaky Test Detector
Identifies tests that fail intermittently across unrelated PRs — a strong signal of flakiness rather than a genuine regression. Also cross-references with existing fix PRs.
## When to Use
- Investigating CI instability ("is this test failure my fault or flaky?")
- Periodic hygiene: finding tests to quarantine or fix
- Before marking a test as `Skip = "Flaky"` — confirm it actually is flaky
- Checking if `RunTestCasesInSequence` (a no-op in xUnit 2) is masking parallelism bugs
## How It Works
1. Queries Azure DevOps builds API directly for recent failed fsharp-ci PR builds
2. Extracts test failures from each build via `Get-BuildErrors.ps1`
3. Aggregates by test name across distinct PRs
4. Cross-references with GitHub PRs that may address the flaky tests
5. Tests failing in **3+ distinct PRs** are flagged as flaky
## Usage
### Quick scan (last 14 days, 50 builds, threshold = 3)
```bash
pwsh .github/skills/flaky-test-detector/scripts/Get-FlakyTests.ps1
```
### Custom parameters
```bash
# More aggressive: 2+ PRs over 7 days
pwsh .github/skills/flaky-test-detector/scripts/Get-FlakyTests.ps1 -MinPRFailures 2 -DaysBack 7
# Wider net: 100 builds over 30 days
pwsh .github/skills/flaky-test-detector/scripts/Get-FlakyTests.ps1 -MaxBuilds 100 -DaysBack 30
```
### Parameters
| Parameter | Default | Description |
|-----------|---------|-------------|
| `-MaxBuilds` | 50 | Maximum number of failed builds to scan from AzDo |
| `-MinPRFailures` | 3 | Min distinct PRs a test must fail in to be flagged |
| `-DaysBack` | 14 | Only consider builds within this time window |
| `-DefinitionId` | 90 | AzDo pipeline definition ID (90 = fsharp-ci) |
| `-Org` | dnceng-public | Azure DevOps organization |
| `-Project` | public | Azure DevOps project |
## Output
The script produces:
1. **Console report** with ranked flaky tests, PR numbers, job names, and sample errors
2. **Structured objects** (PowerShell) for programmatic consumption
## Interpreting Results
- **DistinctPRs ≥ 5**: Almost certainly flaky — consider quarantining immediately
- **DistinctPRs = 3–4**: Likely flaky — investigate root cause
- **DistinctPRs = 2**: Possibly flaky or a shared dependency issue — monitor
## Follow-up Actions
After identifying a flaky test:
1. Check if there's already a GitHub issue for it
2. If not, file one with the `Area-flaky-test` label
3. Consider marking with `[<Fact(Skip = "Flaky: #ISSUE")>]` if it blocks CI
4. Fix the root cause (timing, file locking, thread safety, etc.)Colle ce Markdown dans ton agent ou utilise les boutons ci-dessus pour l’écrire dans ton projet.
Ce que fait Flaky Test Detector (.NET)
Investigating CI instability ("is this test failure my fault or flaky?")
Periodic hygiene: finding tests to quarantine or fix
Before marking a test as `Skip = "Flaky"` — confirm it actually is flaky
Checking if `RunTestCasesInSequence` (a no-op in xUnit 2) is masking parallelism bugs
Comment utiliser Flaky Test Detector (.NET)
1
Copie le prompt
Un clic copie le prompt packagé (ou l'envoie à ton agent).
2
L'agent installe le skill
Il ajoute le SKILL.md et ses ressources à ton projet.
3
Activation automatique
Le skill s'active dès que le contexte correspond.
Déclencheurs pour Flaky Test Detector (.NET)
Dis simplement à ton agent quelque chose comme :
Applique le skill flaky-test-detector__dotnet-dotnet__src-fsharp-github-skills-c4c6bc9f223c à cette tâche
Utilise flaky-test-detector__dotnet-dotnet__src-fsharp-github-skills-c4c6bc9f223c pour améliorer cette implémentation
Passe en revue ce sujet avec flaky-test-detector__dotnet-dotnet__src-fsharp-github-skills-c4c6bc9f223c
Skills liés à Flaky Test Detector (.NET)
Add New Op (Alibaba)
为 MNN 框架新增算子。包含 Schema 定义、形状计算、几何计算、后端实现、单元测试的完整 TDD 流程。分 5 步执行,每步有独立测试标准。ai-regression-testing
Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.Analyze Test Report (PyTorch)
Analyze torch-tensorrt local test results and drive failures to a fix. Use when the user pastes a test report / summary, asks why tests failed, asks to triage or fix failing tests, or mentions the JUnit/test-summary output from `just tests-report` / `just test-summary`. Covers where the JUnit XMLs live, how to read the consolidated report, how to reproduce a single failure, and how to categorize (real bug vs torch-API change vs OOM/skip vs flake).