Behat BDD Testing

Behat BDD Testing is a skill for Claude Code, Codex from PramodDutta/qaskills. It costs 37 tokens per session (4,644 once invoked), scanned A, original, MIT.

A guide to Behavior-Driven Development (BDD) in PHP using Behat. It covers plain-language Gherkin scenarios, reusable context classes, browser testing with Mink, setup and cleanup hooks, and Symfony integration.

In plain words
What is it for?
Use it to write, review, debug, or configure Behat tests for PHP websites, APIs, and Symfony applications.
Why use it?
It helps teams agree on expected behavior before or during development and keeps PHP acceptance tests separated into manageable parts.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pramoddutta/qaskills/behat-bdd-testing
Any agent
npx skills add PramodDutta/qaskills --skill behat-bdd-testing
Clone the repo
git clone --depth 1 https://github.com/PramodDutta/qaskills

Made for: Claude Code, Codex.

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 Behat BDD Testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/pramoddutta/qaskills/behat-bdd-testing.svg)](https://agentmods.dev/skills/pramoddutta/qaskills/behat-bdd-testing)
Your own site
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/behat-bdd-testing"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/behat-bdd-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,644 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00037 $0.04644
Opus 5 $0.00018 $0.02322
Sonnet 5 $0.00007 $0.00929
Haiku 4.5 $0.00004 $0.00464

Measured yesterday against content hash 8c9c22582b10, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Behat BDD Testing 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 yesterday.

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.

seed-skills/behat-bdd-testing/SKILL.md · 595 lines

How it starts

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

Behat BDD Testing

You are an expert QA engineer specializing in Behat, the PHP BDD testing framework. When the user asks you to write, review, debug, or set up Behat tests, follow these detailed instructions. You understand the Behat ecosystem deeply including Gherkin feature files, context classes, Mink browser extension, Symfony integration, hooks, tag filtering, and multi-suite configurations.

Core Principles

  1. Business-Driven Scenarios — Write Gherkin scenarios that describe business behavior, not implementation details. Feature files are living documentation shared with non-technical stakeholders.
  2. Context Separation — Organize step definitions into focused context classes by domain area (AuthContext, CartContext, ApiContext) rather than one monolithic FeatureContext.
  3. Mink for Browser Testing — Use the Mink extension for browser interactions. Leverage built-in Mink steps for navigation, forms, and assertions before writing custom step definitions.
  4. Hooks for Lifecycle — Use @BeforeScenario, @AfterScenario, @BeforeFeature, and @AfterFeature hooks for setup and teardown rather than embedding setup in step definitions.
  5. Suite Organization — Define separate suites in behat.yml for different test types (UI, API, unit) with appropriate contexts and filters.
  6. Dependency Injection — Use Behat's built-in dependency injection or Symfony container integration to share services between contexts cleanly.
  7. Tag-Based Execution — Use tags to categorize scenarios (@smoke, @api, @javascript) and control execution scope, browser driver selection, and reporting.

Project Structure

project-root/
├── behat.yml                      # Main configuration
├── composer.json
├── features/
│   ├── auth/
│   │   ├── login.feature
│   │   ├── registration.feature
│   │   └── password_reset.feature
│   ├── shopping/
│   │   ├── cart.feature
│   │   ├── checkout.feature
│   │   └── product_search.feature
│   ├── api/
│   │   ├── users_api.feature
│   │   └── orders_api.feature
│   └── bootstrap/
│       ├── AuthContext.php
│       ├── ShoppingContext.php
│       ├── ApiContext.php
│       ├── NavigationContext.php
│       └── DatabaseContext.php
├── src/
│   └── Page/
│       ├── BasePage.php
│       ├── LoginPage.php
│       ├── DashboardPage.php
│       └── CartPage.php
├── config/
│   ├── behat/
│   │   ├── dev.yml
│   │   └── ci.yml
│   └── services_test.yaml
└── reports/
    ├── screenshots/
    └── html/

Read the full file on GitHub · 595 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. yesterday First seen · 595 lines · 37 tokens per session scan A 8c9c22582b10

Subscribe to this mod's changes

Behat BDD Testing is a skill published in the GitHub repository PramodDutta/qaskills (217 stars, last pushed 5d ago), licensed MIT. It adds 37 tokens to every session and 4,644 once invoked, about $0.0002 per session on Opus 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-09-03.

Related

Other skills, from other repositories

mate-php-environment-check

Check the PHP runtime with server-info, its version, OS, and loaded extensions. Reach for it when a Mate tool itself fails or a capability is missing and you suspect the environment, a missing extension or an old PHP, rather than the app or its config. Not for diagnosing app behavior (profiler, log investigation) or…

symfony/ai-demo · 84 tokens

mate-system-information

Resolve which dependency versions are actually installed, from composer show and composer.lock, when diagnosing version-specific behavior such as a method, argument or class that does not exist in the release that is really running. For the PHP runtime itself (version, OS, loaded extensions) use the…

symfony/ai-demo · 66 tokens

symfony-docs

Symfony 8.x — routing, controllers, Twig, service container, Doctrine ORM, forms, validation, security, testing.

pledgeandgrow/pledge-skills · 30 tokens

php-expert

Expert-level PHP development with PHP 8+, Laravel, Composer, and modern best practices. Use when the user mentions Laravel, Composer, Symfony, PHPUnit, or PSR standards, or when the task involves PHP 8+ Features, Object-Oriented PHP, Modern PHP, or Constructor Property Promotion.

personamanagmentlayer/pcl · 64 tokens

api-platform-identifiers

Choose and wire up API Platform 4.3 resource identifiers — UUID v7 (recommended for temporal cursor pagination), ULID, scalar (string/int), \DateTimeInterface, composite identifiers via Link(uriVariables: …), custom identifiers (slug) with #[ApiProperty(identifier: true)], decorating UriVariableTransformerInterface to…

gerard-labs/superpowers-api-platform · 0 tokens

api-platform-upgrade

Migrate an API Platform codebase from 3.x or 4.0–4.2 up to 4.3. Trigger when composer.lock shows api-platform/ < 4.3, when grep finds.

gerard-labs/superpowers-api-platform · 49 tokens