Logo : Test Loop

Test Loop

Communauté
alamops
test-loop

(alamops) Runs a project's whole test suite — unit, integration and e2e — by itself, then drives it to green. Use it for any request to run the tests or the e2e suite, get a red suite or red CI green, or fix failing, broken or flaky tests (after a rebase or dependency bump), or to apply review must-fixes and re-run — even a plain "run the tests", and even when a database or other services must be brought up first. Owns the e2e lifecycle itself — starts services and the app, waits for real readiness, runs headless, tears down. Reports pass/fail by layer; on failures re-runs e2e once to separate flakes from defects, decides whether product or test is wrong, fixes each root-cause cluster with file-disjoint agents and re-runs everything, up to three rounds. Never reaches green by skipping, deleting or loosening tests. Phases 7–8 of `implement`, runnable alone; accepts `--no-e2e`. Not for writing new coverage (write-tests), exploratory bug hunting (break-fix), or production incidents.

Add to TypingMind

Présentation

Éditeuralamops
Dépôtskills
Nom de la compétencetest-loop
Étoiles
53
Forks
5
Fichiers inclus
2
LicenceMIT
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont rédigées en Markdown et non sous forme de code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • Fichiers inclus : 2

    Des scripts, des gabarits et des références que le modèle peut consulter pendant son travail. Les fichiers sont en lecture seule et ne sont jamais exécutés.

  • Open source

    Publiée par alamops sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Test Loop dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Copiez l’URL ci-dessous, qui pointe vers le dossier de la compétence, puis collez-la et confirmez.
    https://github.com/alamops/skills/tree/main/skills/test-loop
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter une compétence → Via une URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/alamops/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/test-loop .claude/skills/test-loop
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Test Loop dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Test Loop dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, la compétence Test Loop n’est pas liée au modèle pour lequel elle a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

Test loop — run everything, then drive it to green

Two jobs, in order. Run: execute the whole suite — every layer, e2e included — and report exactly what passed and failed. Fix: when something failed, find out why, fix the cause, and run everything again until it's green or you hit a wall that needs a human.

The rule that makes this loop worth trusting: green has to mean the software works. A suite made green by skipping the failing test, deleting it, or loosening its assertion until it matches the wrong output is worse than a red one — it's a red suite that lies.

Where this sits

This is Phases 7 and 8 of the implement delivery loop, packaged to run on its own. It typically follows write-tests, and it also accepts must-fix findings from a code review (e.g. the code-review skill) as items to fix before the final green run.

1. Run-only or to-green?

Read what was asked:

  • "Run the tests" / "what's failing?" → run and report, then offer the fix loop. Nobody asked you to edit code yet.
  • "Get it green" / "fix the failing tests" / "CI is red, sort it out" → run, then loop.

2. Find the recipe

Before running anything, find out how this project actually runs its tests, from the most to least authoritative source:

  1. A plan's run recipe (docs/plans/<slug>.md §5) or an investigation brief's Runnability section.
  2. The CI config (.github/workflows/, .gitlab-ci.yml, circleci, …) — the most reliable record of the real commands, the services they need, and the environment variables they set.
  3. Package scripts, Makefile, justfile, docker-compose files, the README's contributing section.

If you still can't tell, ask the user once, and write the answer down (in the plan, if there is one) so nobody has to ask again.

"The whole suite" is everything CI runs, not just the test runner. That includes typecheck, lint, format check, a migration down-and-up, and builds. A branch that's green on tests and red in CI on lint is red. If the PR description says CI runs a gate and the workflow doesn't, report that too.

3. Run the suite

Run it in a background agent (on Claude Code, a general-purpose agent with run_in_background; you're notified when it finishes), or directly if the suite is quick. Unit and integration first; e2e after, since it's slower and its failures are easier to read once the lower layers are known-good.

The e2e suite is run by you, not handed back. "It needs a running app" is a setup step, not a reason to stop. Own the whole lifecycle:

  1. Prepare — install what's missing (e.g. npx playwright install), start local services (database, queue, cache — usually via the project's compose file), run migrations and seed fixture data.
  2. Start — launch the app and its dependencies as background processes, then wait for readiness: poll the health endpoint or port until it answers. Firing tests at a half-booted server produces failures that aren't real. If the default port is taken, use a free one; never kill a process you didn't start.
  3. Run — execute the e2e command headless. On failure, keep what makes it diagnosable — traces, screenshots, videos, server logs — not just the exit code.
  4. Tear down — stop everything you started, even when the run failed, so the next run begins clean.

When a step genuinely can't be automated — a real payment gateway, a physical device, human 2FA, credentials you don't hold — don't abandon the run. Automate everything up to that point, run the maximal subset that passes without the blocked step, and hand over a precise manual runbook for the remainder (commands, URLs, expected results), so the human's share is minutes of clicking rather than detective work. A partial e2e run with a clear handoff beats a skipped one every time.

Under --no-e2e (or "skip e2e"), run unit and integration layers only, and say so in the report.

Report shape, per layer: the command, pass/fail/skip counts, each failing test with the relevant slice of output (the assertion and the first meaningful stack frame, not 400 lines), and paths to artifacts.

Check that green is real before calling anything a pass. Suites often "pass" without running. A common way is test helpers that quietly return when DATABASE_URL or a service is missing, so every database test passes in 0 ms. Have each layer write a JUnit XML or Jest/Vitest JSON report (vitest --reporter=junit --outputFile=…, jest-junit, pytest --junitxml=…, go-junit-report) and run:

sh
python3 scripts/quality_gates.py suite <reports…> --baseline <base-reports…> --require-env <VARS> --scan-tests <test-dir>

(scripts/ sits next to this file; Python 3.9+, standard library only.) It mechanizes the checks below. Read its output, then confirm the parts it can't judge. Before reporting a layer green, check all of these:

  • Skip counts. Every skip needs a reason. A layer that's mostly skipped didn't run.
  • Durations. If a block of integration tests finished in about 0 ms, they didn't run.
  • Env and services. Each env var and service the layer needs must have been present for the run. Read the helpers for early returns.
  • Test count against the base branch or the last CI run. A drop means files stopped loading.

A layer that passed without its dependencies counts as not run, and the report says so. When you find the silent-return pattern, it's a defect to report, and to fix if fixing is in scope: skip loudly instead (it.skipIf, ctx.skip()), and add a global setup that fails under CI when a required service is unreachable.

4. Triage — decide what each failure means

Before anyone changes code, diagnose:

  • Cluster by root cause. Thirty failures from one broken fixture is one problem, not thirty. Fix the cause and the cluster goes with it.
  • Re-run failing e2e tests once. E2e is the flakiest layer. A consistent failure means the product code, or the test's assumptions, is wrong. A pass on retry means the test is at fault — it's racing something — and it needs a real repair, not a retry.
  • Product or test? Read the test's intent and the acceptance criteria (the plan, the ticket, the PR). If the test encodes the intended behavior and the product doesn't do it, the product is wrong. If the change deliberately altered behavior and the test still asserts the old one, the test is outdated — updating it is legitimate, and the report says why. If you can't tell which behavior is intended, and the answer changes what users see, ask rather than guess.
  • Caused by this change, or already red? When the loop is about a specific change, check whether a failure also happens at the base commit (a quick run in a worktree at the base SHA settles it). Pre-existing failures still get reported — but say they predate the change, and ask before widening the fix scope to them unless the user asked for the whole suite green.
  • Review findings. If you were handed must-fix findings from a code review, treat each as a fix item alongside the test failures. Before fixing one, confirm it reproduces at the commit the reviewer read. A finding you can't reproduce goes back to the reviewer as a question; it isn't "fixed" blind. Track each one by its ID and title from start to report. An ID on its own means nothing to someone reading the report later.

5. Fix round

Size the round to the fixes. A few one-line fixes in separate files are faster to make yourself than to brief an agent for, and every agent carries a full context. Spawn fix agents when clusters are substantial and independent enough that parallel wall-clock actually matters.

When you do fan out, spawn fix agents in one message, one per failure cluster or finding, with file-disjoint ownership — two agents editing the same file corrupt each other's work; sequence or merge clusters that share files. On Claude Code, use general-purpose agents and leave the model unset unless the user asked for one. If your harness has no sub-agent tool, fix the clusters yourself, one at a time.

Each fix brief carries the diagnosis and its evidence, the owned files, and the instruction to fix the cause, not the symptom. For a flaky test, that means readiness waits, deterministic seeds, isolated state — not sleeps, retries baked into the test, or a longer timeout on its own.

Fix code is new code, and fix rounds are where new holes open. So each fix brief also carries the absolute path of references/build-rules.md (next to this file) with the sections for what the fix touches: Always, plus trust, data, external, concurrency, state or tests as relevant. It also requires the self-check at the end of that file, run with --paths <owned files>, and evidence in the agent's report.

These are off the table, in every round, for every agent:

  • Skipping or focusing tests (.skip, xit, @pytest.mark.skip, .only), or excluding them from the run.
  • Deleting a failing test, or weakening its assertion to match the wrong output.
  • Updating snapshots or golden files without checking that the new output is right.
  • Catching and swallowing the error that made the test fail.

If one of these is genuinely correct (the test covers a feature that was intentionally removed), it's a decision the report states and justifies — not something that happens quietly in a fix round.

Fixing a review finding carries four extra obligations. Each one guards against a way review fixes have gone wrong before:

  • A regression test that is red for the bug. Write the test first, and run it against the code the review read. It must fail on its assertion, describing the bug. A test that fails at the old commit only because it imports a module or calls a route the fix adds proves nothing. Write it against behavior that exists on both sides of the fix, and record the red output.
  • Every path into the guarded action, including the new ones. If the finding was "this path skips the check", list every path into that action after the fix. The paths the fix itself adds count too: a retry, a follow-up job, a short-cut for already-validated input. That's where the same hole most often reopens. If the fix validates something an untrusted party produced, store the validated copy where that party can't write.
  • The class, not the instance. Grep for the pattern behind the finding (an unscoped lookup, a raw state write, an optional config fallback, a missing cleanup) and fix every site. That includes code this round is adding.
  • Partial is partial. If the fix closes the cited path but not a sibling, report it as partial, and say what remains.

6. Re-run and loop

After each fix round, re-run the whole suite, not just the tests that failed — fixes break neighbors. Loop: triage → fix → re-run.

Cap it at three rounds, then stop and check in with the user, reporting the remaining failures with evidence and what you tried. A loop that keeps going past the point of progress burns time and tends to drift toward exactly the shortcuts listed above.

7. Report

Write it from the final run, at the final commit. Don't reuse numbers from an earlier round. If a PR description or a doc quotes test counts or lists fixes, update it to match before you hand back.

  • Final result per layer — the command used, pass/fail/skip counts, and the static gates CI runs. If e2e was skipped (by flag, or because some step couldn't be automated), say so and why. If a layer ran without its dependencies, report it as not run.
  • Rounds — how many, and what each fixed.
  • Fixes — for each: product or test, the cause, the files changed. Call out every test that was updated because the change made it outdated, with the reason.
  • Review findings — for each, by ID and title: fixed, partial (what remains), or not fixed (why). Give the commit and the regression test, plus the red output from before the fix.
  • Flakes repaired — and what made them flaky.
  • Still failing — with evidence, and whether they predate the change.
  • Manual runbook — for any e2e step that couldn't be automated.

Fichiers inclus

Le modèle lit ces fichiers à la demande lorsque la compétence est chargée. Ils sont accessibles en lecture et ne sont jamais exécutés.

Foire aux questions

À quoi sert la compétence IA Test Loop ?

(alamops) Runs a project's whole test suite — unit, integration and e2e — by itself, then drives it to green. Use it for any request to run the tests or the e2e suite, get a red suite or red CI green, or fix failing, broken or flaky tests (after a rebase or dependency bump), or to apply review must-fixes and re-run — even a plain "run the tests", and even when a database or other services must be brought up first. Owns the e2e lifecycle itself — starts services and the app, waits for real readiness, runs headless, tears down. Reports pass/fail by layer; on failures re-runs e2e once to separ...

Pourquoi utiliser Test Loop sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Test Loop se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Test Loop dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/alamops/skills/tree/main/skills/test-loop. TypingMind lit le fichier SKILL.md, regroupe les fichiers associés et installe le tout sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Test Loop ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Test Loop ?

Autant que vous le souhaitez. Vous pouvez utiliser Test Loop avec tout modèle qui prend en charge les compétences : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Test Loop est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par alamops sous licence MIT. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, gabarits ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace de travail IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇