Ausführbare Fehlerreproduktionen
Macht aus einem Fehlerbericht einen eigenständigen Test, der am tatsächlichen Defekt scheitert und später die Korrektur schützt.
executable-reproduction-tests
Workflow-Agenten mit diesem Skill
Wann ist der Skill hilfreich?
Nutze ihn, wenn eine Reproduktion noch manuelle Schritte, Restdaten oder unvorhersehbare Zeitabläufe benötigt.
Wobei hilft er dir?
- Stellt sicher, dass der Test am tatsächlichen Defekt scheitert.
- Erstellt minimale unabhängige Testdaten mit kontrollierter Zeit und Zufälligkeit.
- Bereinigt eigene Ressourcen und dokumentiert begrenzte Fehlerraten.
Das könntest du fragen
Mache den Bericht zur doppelten Übermittlung zu einem zunächst fehlschlagenden Regressionstest. Steuere beide Eingaben über einen Synchronisationspunkt statt Schlafzeiten. Die fehlschlagende Prüfung erkennt doppelte Datensätze, keinen Einrichtungsfehler.
Ausführliche Dokumentation
Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.
Weniger anzeigen
Executable Reproduction Tests
When to Use
Use whenever a reproduced bug can be expressed as an automated test case (unit, integration, API, or Playwright/E2E) or a self-contained reproduction script using the project's existing test runner.
Properties of a High-Signal Reproduction Test
1. Fails for the Right Reason (Target-Specific Assertion)
A reproduction test is useless if it fails because of a missing mock, a syntax error, an unseeded database table, or a generic timeout instead of the actual product defect:
- Verify Code-Path Execution: Confirm the test actually reaches the defective function, SQL query, or UI handler before failing.
- Assert the Specific Expected Contract:
- Do not write weak assertions like
expect(() => run()).not.toThrow()when the bug is a wrong return value, orexpect(res.status).toBe(500)(which cements the buggy behavior!). - Write the assertion for the correct expected behavior (
expect(res.status).toBe(200)andexpect(body.total).toBe(150)), so the test fails today with the exact bug signature and will pass unmodified once the fix is applied.
- Do not write weak assertions like
2. Self-Contained Setup & Teardown
- Seed only the minimal fixture data required by the reproduction inside the test (
beforeEach/ factory helper / temp directory). - Never depend on external network availability, live third-party credentials, or leftover state from previous test files.
- Clean up all temporary files, timers, child processes, and database records in
afterEach/try ... finally.
3. Deterministic Control Over Time, Randomness & Concurrency
Eliminate flakiness in reproduction tests:
- Time-Dependent Bugs: Use fake timers or injected clocks (
vi.setSystemTime(...),sinon.useFakeTimers, frozenClockinterface) rather thansleep(2000). - Race Conditions: Use explicit synchronization barriers (
Deferredpromises, deterministic request interceptors, controlled stream chunks) rather than hopingsetTimeout(..., 10)hits the race window. - Intermittent Bugs: If a bug remains probabilistic (
p < 1), run a bounded loop or stress harness with fixed seeds and report the exact failure rate (kfailures inNruns).
4. Non-Intrusive Instrumentation Rule
- Never silently mutate production application code to force a test to fail.
- If temporary diagnostic logging or a test hook is needed to prove a timing window, keep it strictly isolated and clearly marked as diagnostic instrumentation to be removed.
Enthaltene Dateien 1
SKILL.md
