behat-skill

Generate Behat BDD tests from Gherkin feature files for PHP applications.

350|69|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/LambdaTest/agent-skills --skill behat-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: behat-skill
Source: https://github.com/LambdaTest/agent-skills/tree/main/behat-skill
Command: npx skills add https://github.com/LambdaTest/agent-skills --skill behat-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires behat/behat, behat/mink-extension, behat/mink-selenium2-driver, and includes references (resource) components.

What problem does it solve?

This Skill automates the creation and execution of Behavior-Driven Development (BDD) tests for PHP applications, enabling teams to write tests in a human-readable format using Gherkin.

Core Features & Use Cases

  • Gherkin Feature Files: Write test scenarios in plain language using the Gherkin syntax.
  • MinkContext Integration: Leverage Mink for browser automation and interaction with web applications.
  • Custom Contexts: Define custom step definitions for application-specific logic.
  • Cloud Execution: Configure Behat to run tests on cloud platforms like LambdaTest.
  • Use Case: A QA engineer needs to write end-to-end tests for a new user registration flow. They can use this Skill to create a register.feature file and corresponding PHP context classes to automate the testing process.

Quick Start

Use the behat-skill to generate a basic Behat test for a login page.

Frequently Asked Questions about behat-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write BDD tests for PHP using Gherkin feature files?

BDD tests for PHP are written using Gherkin syntax in feature files, which describe test scenarios in plain human-readable language. This approach bridges communication between developers and QA by defining expected application behavior without requiring complex code.

How do I automate browser interactions in Behat tests using MinkContext?

Browser automation in Behat tests is handled by integrating MinkContext, which provides built-in step definitions for interacting with web applications. This allows you to simulate user actions like clicking links and filling forms across different browser drivers.

Can I run Behat tests on cloud platforms like LambdaTest?

Yes, Behat tests can be configured for cloud execution on platforms like LambdaTest. This integration allows you to execute automated browser tests across various cloud environments without maintaining local browser infrastructure.

Do I need Composer to manage Behat and Mink dependencies?

Composer is required to manage dependencies for Behat, the Mink extension, and the Selenium2 driver. This PHP dependency manager ensures all necessary testing libraries are properly installed and autoloaded for your BDD test suite.

How do I create custom step definitions for application-specific logic in Behat?

Custom step definitions in Behat are created by defining custom context classes in PHP. This allows you to write specialized testing logic tailored to your application's unique requirements beyond the standard Gherkin steps provided by MinkContext.