Drupal Testing
Test-driven development for Drupal with PHPUnit and Drupal Test Traits (DTT). Use when writing or fixing tests, deciding what is worth a test, reproducing a bug before fixing it, choosing a bootstrap level (Unit vs Kernel vs ExistingSite/functional), testing permission gates, adding Playwright visual verification, or debugging tests that silently run zero assertions. Covers the bug-fix RED-first discipline, the worth-a-test rubric, bootstrap cost tradeoffs, negative tests, the anonymous-403 permission trap, DTT gotchas, and the PHPUnit-version pin that makes Drupal tests pass vacuously.
Install
npx skills add grasmash/drupal-claude-skills --skill drupal-testinggit clone --depth 1 https://github.com/grasmash/drupal-claude-skills.git /tmp/drupal-claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/drupal-claude-skills/skills/drupal-testing ~/.claude/skills/drupal-testingPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Drupal Testing (TDD) Hard-won testing discipline for Drupal. Pairs with the `test-writer` and `test-runner` agents — this skill is the *how*, those agents are the *who*. ## What's worth a test (read FIRST) Before writing ANY test, decide whether it earns its place. A test is worth committing ONLY if **BOTH** hold: 1. **A future change could PLAUSIBLY and SILENTLY break it.** (Not "could someone theoretically delete this" — a realistic code path that a normal edit could regress without noticing.) 2. **The breakage MATTERS:** user-facing behavior, data integrity, money, security, or an API/client contract. If either fails, the test is pure cost with no protection — **skip it.** A committed assertion you have to maintain forever, that guards against a regression that can't realistically happen, is maintenance drag, not a safety net. **Bug fixes are still mandatory TDD** (see the next section). The rubric here governs *new coverage you choose to add*, not the bug-fix discipline. ### HIGH value — always test - Business / algorithm logic, data transforms, scoring, attribution. - Money / subscriptions / entitlements. - Security & permission gates — pin at the route level (see "The anonymous-403 permission trap" below). - Cache invalidation & freshness — mutate via the real path, assert the surface updates.
Details
- Skill name
drupal-testing- Repository
- grasmash/drupal-claude-skills
- Path
skills/drupal-testing/SKILL.md- License
- MIT
- Repo updated
- 1 October 2026
FAQ
What does the Drupal Testing skill do?
Test-driven development for Drupal with PHPUnit and Drupal Test Traits (DTT). Use when writing or fixing tests, deciding what is worth a test, reproducing a bug before fixing it, choosing a bootstrap level (Unit vs Kernel vs ExistingSite/functional), testing permission gates, adding Playwright visual verification, or debugging tests that silently run zero assertions. Covers the bug-fix RED-first discipline, the worth-a-test rubric, bootstrap cost tradeoffs, negative tests, the anonymous-403 permission trap, DTT gotchas, and the PHPUnit-version pin that makes Drupal tests pass vacuously.
How do I install the Drupal Testing skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add grasmash/drupal-claude-skills --skill drupal-testing. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Drupal Testing popular?
It lives in grasmash/drupal-claude-skills, which has 84 GitHub stars and 5 forks.
Related skills
Acquia Source
84grasmash/drupal-claude-skills
Connect to an Acquia Source ("Source powered by Drupal CMS") site — its JSON:API and MCP endpoints, OAuth2 auth, the @drupal-canvas CLI, and the Canvas Page API deploy workflow. Use when wiring an AI agent or app to a Source CMS site, building/uploading Drupal Canvas Code Components, deploying landing pages via the Page API, or registering the Source MCP server with Claude Code/Cursor.
Canvas Contribution
84grasmash/drupal-claude-skills
Workflow for contributing features and fixes to the Drupal Canvas module on drupal.org while consuming it from a separate project: the two-repository setup, Canvas UI development, issue forks, merge requests, and composer patches. Use when developing a Canvas feature or bug fix intended for upstream, or when moving a local Canvas change onto a drupal.org issue. Extends drupal-contrib-mgmt with Canvas-specific details.
Claude Code MCP Setup
84grasmash/drupal-claude-skills
Add and configure MCP (Model Context Protocol) servers in Claude Code. Use when adding new MCP servers, configuring remote MCP, setting up OAuth MCP servers, troubleshooting MCP connections, or running /mcp diagnostics. Covers stdio, HTTP, and SSE transport types.
Test Audit
49PyModel/jev-judge-mcp
Invoke whenever writing, changing, reviewing, or sweeping tests in jev-judge-mcp. Authoring gate for new tests plus audit workflow for low-value, implementation-coupled, or duplicative tests and the test-only production seams they demand, under this repo's rule that a test is never deleted or weakened to make a failing build pass.
Stress Test
45gbasin/stress-test-skill
Adversarially stress-test a technical plan by verifying claims against real docs, running POC code, and updating the plan before you build.
Olore Bunit Latest
119olorehq/olore
Local bunit documentation reference (latest). bUnit Blazor testing documentation. Use for Blazor component testing, rendering, event handling, JSInterop mocking, and test assertions in .NET.
Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.