One-click install
npx skills add https://github.com/a2f0/tearleads --skill preen-test-flakiness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: preen-test-flakiness
Source: https://github.com/a2f0/tearleads/tree/main/.codex/skills/preen-test-flakiness
Command: npx skills add https://github.com/a2f0/tearleads --skill preen-test-flakiness

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the frustration and unreliability caused by flaky tests in software development, ensuring more stable and trustworthy CI/CD pipelines.

Core Features & Use Cases

  • Identify Flake Sources: Detects common anti-patterns like time-based waits, retry mechanisms, and non-deterministic data.
  • Replace Nondeterminism: Replaces fragile sleep or setTimeout calls with condition-based waits and stabilizes asynchronous behavior.
  • Use Case: When CI builds intermittently fail without code changes, this skill can pinpoint and fix the underlying test flakiness, leading to more reliable deployments.

Quick Start

Run the preen-test-flakiness skill to discover and fix time-based waits in your test files.

Frequently Asked Questions about preen-test-flakiness

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix flaky tests in my CI/CD pipeline?

To fix flaky tests in a CI/CD pipeline, you analyze test files to detect anti-patterns like time-based waits and retries. This skill pinpoints intermittent failure sources and replaces nondeterministic elements with stable, condition-based synchronization mechanisms.

What causes intermittent test failures without code changes?

Intermittent test failures without code changes are typically caused by nondeterministic elements such as race conditions, fragile sleep calls, and non-deterministic data. These anti-patterns create timing dependencies that cause unpredictable CI/CD build results.

How do I replace sleep and setTimeout calls in automated tests?

You replace sleep and setTimeout calls in automated tests by implementing condition-based waits. This involves refactoring test files to use stable waiting and synchronization mechanisms that wait for specific states rather than arbitrary time durations.

Can this skill detect race conditions in my test suites?

Yes, this skill can detect race conditions in your test suites. It proactively analyzes test files to identify common flaky test patterns, focusing specifically on resolving race conditions, time-based waits, and retry mechanisms.

Does this tool require specific testing frameworks to analyze test files?

No specific testing frameworks are required as dependencies. The tool operates by analyzing your test files directly to identify flake sources and implement stable waiting mechanisms, making it applicable to test suites exhibiting intermittent failures across various setups.