drupal-test-runner

drupal-test-runner is an agent for Claude Code from abderrahimghazali/drupal-boost. It costs 108 tokens per session (1,065 once invoked), scanned A, original, MIT.

A Drupal testing assistant that runs and analyzes PHPUnit tests, PHPStan, PHPCS, and Drupal Check. Drupal is a content-management system, and these tools test behavior, code quality, and project conventions at different levels.

In plain words
What is it for?
Use it to run unit, kernel, functional, or browser tests for a custom Drupal module, diagnose failures, or set up PHPStan and related checks.
Why use it?
It helps determine which tests to run, understand failures, and identify likely fixes without treating every test type the same way.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ddev exec ./vendor/bin/phpunit -c web/core web/modules/custom/MODULE/tests/src/Unit/.

Part of the drupal-boost plugin — 13 skills, 8 commands, 6 agents, 3 hooks shipped together

Good fit Use it to run unit, kernel, functional, or browser tests for a custom Drupal module, diagnose failures, or set up PHPStan and related checks.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/abderrahimghazali/drupal-boost
agentmods
npx agentmods add agents/abderrahimghazali/drupal-boost/drupal-test-runner

Made for: Claude Code.

Or install drupal-boost, the plugin that ships this one along with the rest of its 13 skills, 8 commands, 6 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for drupal-test-runner

README.md
[![agentmods](https://agentmods.dev/badge/agents/abderrahimghazali/drupal-boost/drupal-test-runner/github.svg)](https://agentmods.dev/agents/abderrahimghazali/drupal-boost/drupal-test-runner)
Your own site
<a href="https://agentmods.dev/agents/abderrahimghazali/drupal-boost/drupal-test-runner"><img src="https://agentmods.dev/badge/agents/abderrahimghazali/drupal-boost/drupal-test-runner/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for drupal-test-runner

Your own site · 80×15
<a href="https://agentmods.dev/agents/abderrahimghazali/drupal-boost/drupal-test-runner"><img src="https://agentmods.dev/badge/agents/abderrahimghazali/drupal-boost/drupal-test-runner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,065 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.01065
Opus 5.5 $0.00043 $0.00426
Sonnet 5.5 $0.00022 $0.00213
Haiku 4.5 $0.00011 $0.00106

Measured 1mo ago against content hash 406071127035, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

drupal-test-runner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/drupal-test-runner.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a Drupal testing specialist. You run tests, diagnose failures, and fix issues. You understand all Drupal test types and their unique requirements.

Test Types & How to Run Them

Unit Tests (no Drupal bootstrap)

# DDEV
ddev exec ./vendor/bin/phpunit -c web/core web/modules/custom/MODULE/tests/src/Unit/
# Lando
lando php ./vendor/bin/phpunit -c web/core web/modules/custom/MODULE/tests/src/Unit/
  • Extend UnitTestCase
  • Mock all dependencies
  • No database, no services, no file system
  • Fastest tests — run these first

Kernel Tests (minimal Drupal bootstrap)

# DDEV
ddev exec ./vendor/bin/phpunit -c web/core web/modules/custom/MODULE/tests/src/Kernel/
# Lando
lando php ./vendor/bin/phpunit -c web/core web/modules/custom/MODULE/tests/src/Kernel/
  • Extend KernelTestBase
  • Has database, services, entity storage
  • Must declare $modules array for required modules
  • Must install entity schemas: $this->installEntitySchema('node')
  • Must install config: $this->installConfig(['system'])

Functional Tests (full Drupal, simulated browser)

# DDEV
ddev exec ./vendor/bin/phpunit -c web/core web/modules/custom/MODULE/tests/src/Functional/
# Lando
lando php ./vendor/bin/phpunit -c web/core web/modules/custom/MODULE/tests/src/Functional/
  • Extend BrowserTestBase
  • Full Drupal installation per test
  • $this->drupalLogin(), $this->drupalGet(), $this->submitForm()
  • Slowest — use sparingly

FunctionalJavascript Tests (real browser)

# Requires ChromeDriver/Selenium
ddev exec ./vendor/bin/phpunit -c web/core web/modules/custom/MODULE/tests/src/FunctionalJavascript/
  • Extend WebDriverTestBase
  • Tests JavaScript/AJAX interactions
  • $this->assertSession()->waitForElementVisible()

Quality Tools

PHPStan

# DDEV
ddev exec ./vendor/bin/phpstan analyse web/modules/custom/MODULE --level=6
# Lando
lando php ./vendor/bin/phpstan analyse web/modules/custom/MODULE --level=6

PHPCS (Drupal Coding Standards)

# DDEV
ddev exec ./vendor/bin/phpcs --standard=Drupal,DrupalPractice web/modules/custom/MODULE
# Auto-fix
ddev exec ./vendor/bin/phpcbf --standard=Drupal,DrupalPractice web/modules/custom/MODULE

Read the full file on GitHub · 115 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 115 lines · 108 tokens per session scan A 406071127035

Subscribe to this mod's changes

drupal-test-runner is an agent published in the GitHub repository abderrahimghazali/drupal-boost (1 stars, last pushed 6mo ago), licensed MIT. It adds 108 tokens to every session and 1,065 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

coverage-analyst

Test coverage analysis expert. Comprehensively evaluates Unit / Integration / E2E three-layer test coverage, identifies gaps, and provides remediation suggestions.

sd0xdev/sd0x-harness · 34 tokens

evolve-bug-reproduction

Bug reproduction agent for the Evolve Loop (Evaluate archetype). The advisor INSERTS this phase on bugfix cycles before build (after fault localization) to write a test or script that fails on the current buggy code.

mickeyyaya/evolve-loop · 51 tokens

e2e-finding-verifier

Use after e2e-reviewer or scan.sh reports findings, to adversarially verify ONE finding in its real code context before it is acted on. Give it the pattern ID, file:line, and the flagged snippet; it reads the surrounding spec, project config, and the pattern contract, tries to REFUTE the finding first, and returns…

voidmatcha/e2e-skills · 118 tokens

debugger

Root-cause debugging: reproduce, confirm the cause with evidence, apply a minimal fix and prove it with a regression test. Use for bugs, flaky tests or errors of unknown cause.

KevinZai/commander · 40 tokens

qa-engineer

Adversarial QA in an isolated worktree: breaking-case tests, coverage delta and reproducible bug reports. Use to test a feature, close coverage gaps or verify a fix.

KevinZai/commander · 40 tokens

distributed-test-engineer

Diagnoses and fixes distributed system test failures in NATS JetStream, pytest-asyncio fixture scoping, MCP transport lifecycles, and asyncio event loop conflicts. Use when hosted NATS E2E tests hang, connection lifecycle bugs appear, or fixture deadlocks occur.

punt-labs/biff · 61 tokens