Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
masanao-ohba avatar

Sequential Test Execution

  • 2 installs
  • 2 repo stars
  • Updated March 18, 2026
  • masanao-ohba/claude-manifests

A PreToolUse Bash hook that blocks new test runs while a test container is active, preventing concurrent test execution and resource conflicts.

About

Registers a PreToolUse hook that detects running test containers and blocks launching new test processes until they finish. A developer uses it to enforce one-test-run-at-a-time isolation across shared databases and ports.

  • PreToolUse Bash hook blocks concurrent test runs
  • Prevents port collisions and migration conflicts

Sequential Test Execution by the numbers

  • 2 all-time installs (skills.sh)
  • Ranked #1,683 of 2,153 Testing & QA skills by installs in the Skillselion catalog
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/masanao-ohba/claude-manifests --skill sequential-test-execution

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2
repo stars2
Last updatedMarch 18, 2026
Repositorymasanao-ohba/claude-manifests

What it does

A PreToolUse Bash hook that blocks new test runs while a test container is active, preventing concurrent test execution and resource conflicts.

Files

SKILL.mdMarkdownGitHub ↗

Sequential Test Execution

Ensures test runs execute one at a time to prevent resource conflicts.

Core Principle

One Test Run at a Time

>

Test environments share databases, ports, and network resources.
Concurrent test execution causes migration conflicts, port collisions,
and flaky test results.

Detection Method

Uses Docker container state (not file locks) to detect running tests:

  • Self-recovering: docker compose run --rm auto-removes containers on exit
  • No stale locks: docker ps reflects actual running state
  • Graceful degradation: If Docker is unavailable, tests proceed normally

Hook Behavior

PreToolUse (Bash)

1. Extract command from TOOL_INPUT 2. Check if command is a test execution command 3. Query docker-compose.test.yml for running web containers 4. Running container foundexit 2 (block with message) 5. No running containerexit 0 (allow)

PostToolUse (Bash)

1. Only triggers on docker compose test commands 2. Logs completion timestamp and exit code to $TMPDIR/claude-workflow/test-execution.log 3. Always exit 0 (informational only)

When Blocked

If a test run is blocked:

1. Wait for the existing test container to complete 2. Retry the test command after completion 3. Do NOT force-remove the running container

Test Command Patterns Detected

docker compose -f docker-compose.test.yml run ...
phpunit
jest
pytest
composer test
npm test
TEST_ONLY=...

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.