awesome-repositories.com
Blog
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectAboutHow we rankPressMCP server
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
Behat avatar

Behat/Behat

0
View on GitHub↗
3,959 stars·614 forks·PHP·MIT·5 viewsbehat.org↗

Behat

Behat is a behavior-driven development framework and test automation tool for PHP. It functions as a Gherkin test runner that maps natural language feature files to executable PHP methods to verify that software implementation aligns with business requirements.

The framework enables the definition of application behavior using a structured, human-readable format based on user stories, supporting localized keywords for non-English speaking stakeholders. It distinguishes itself through a driver-based browser simulation layer for user interface verification and specialized integrations for the Symfony kernel and Drupal workflows.

The toolset covers a broad range of capabilities including automated regression testing, web browser automation, and complex data handling via table transformations. It provides a command-line interface for test execution, lifecycle hooks for setup and teardown, and a plugin system for extending core functionality with third-party tools.

Execution results are available in multiple formats, including human-readable text, JSON, and JUnit XML.

Features

  • Behavioral Testing Tools - Provides a complete framework for defining application expectations in plain language to align technical implementation with business requirements.
  • Behavior Driven Development - Implements behavior-driven development by mapping natural language specifications to executable PHP code.
  • Gherkin-based Testing - Executes end-to-end tests using human-readable Gherkin feature files to verify application behavior.
  • Step-to-Code Mappings - Links natural language steps in feature files to specific PHP methods using attributes or regular expressions.
  • Browser Driver Abstractions - Abstracts web interactions through a driver layer to verify UI behavior across different browser engines.
  • Step Definition Contexts - Uses specialized context classes to isolate and organize step definitions for behavioral tests.
  • Acceptance Testing - Verifies that PHP software implementation matches business requirements through natural language scenario execution.
  • Automation Frameworks - Provides an automation framework to verify business workflows through structured scenarios and step definitions.
  • Browser Automation - Simulates user interactions with web pages through a browser driver to verify user interface behavior.
  • Business Requirement Validations - Aligns technical implementation with business goals using structured Given-When-Then behavioral formats.
  • Behavior-Driven Scenario Definitions - Describes business expectations using a structured Given-When-Then format to document system behavior.
  • Behavioral Specifications - Enables the definition of application behavior using business-readable specifications and conversational contexts.
  • Gherkin Feature Parsers - Converts business-readable feature files into executable data structures using configurable compatibility modes.
  • Automated Regression Verification - Executes behavioral specifications to detect regressions and ensure consistency during system updates.
  • BDD Frameworks - Implements a behavior-driven development tool for PHP that executes human-readable test scenarios written in Gherkin.
  • State Expectation Validation - Uses assertion libraries to verify that the current application state matches the defined business expectations.
  • Step Definition Mappings - Maps natural language Gherkin steps to executable PHP methods using regular expressions or attributes.
  • Test Suite Organization - Implements mechanisms for grouping related features and assigning them specific contexts to manage test expectations.
  • Web Browser Simulation - Simulates user interactions with web pages by controlling a browser through a driver to verify interface behavior.
  • Step State Trackers - Reports each executed test step as successful, failed, or pending to provide detailed execution reports.
  • Scenario - Excludes specific scenarios globally based on tags to prevent certain tests from running unless requested.
  • Gherkin Table Transformations - Converts tables or rows from test steps into structured arrays or objects for simplified logic.
  • Test Result Formatters - Allows generating test results in various formats by listening to internal framework events.
  • Output Formatters - Configures how test results are presented by enabling specific formatters within profile settings.
  • Test Console Formatting - Renders test results in various styles, such as pretty or JUnit, directing them to the console or files.
  • Configuration Profiles - Manages multiple named configuration profiles to switch between different testing environments and targets.
  • Lifecycle Hook Filters - Provides the ability to restrict when specific setup and teardown hooks run using tags associated with scenarios.
  • Event-Hook Extension Systems - Provides an event-driven system allowing plugins to intercept and trigger custom logic during the test lifecycle.
  • Complex Data Arguments - Supports sending rich data structures, such as Gherkin tables or multiline strings, to step definitions.
  • Test Configuration Injection - Injects dynamic configuration values and environment variables into test context constructors during bootstrapping.
  • Environment Variable-Based Configuration - Uses JSON-formatted environment variables to define default configuration values without hardcoding.
  • Step Argument Transformations - Implements a pipeline to transform raw string arguments from Gherkin steps into typed PHP objects.
  • Core Capability Extensions - Integrates and configures external plugins to extend the core functionality of the testing framework.
  • Third-Party Plugins - Integrates third-party plugins to add custom behaviors, browser automation, and specialized reporters.
  • Test Configuration Managers - Defines multiple named configuration profiles to switch between different testing environments.
  • Test Result Reporters - Generates formatted reports of test execution outcomes in styles including human-readable text, JSON, and JUnit XML.
  • Setup and Teardown Hooks - Executes arbitrary PHP code before or after suites and scenarios to handle setup, teardown, and statistics.
  • Failure Flow Control - Manages test execution flow, including the ability to stop on the first error or rerun failures.
  • Label-Based Filtering - Uses tags and labels on features and scenarios to filter which subsets of the test suite are executed.
  • Scenario Parameterization - Executes a single scenario template multiple times using a table of values to test various data inputs.
  • Scenario Prerequisite Steps - Runs common setup steps before every scenario in a feature to eliminate repetitive test preparation.
  • Step Argument Transformations - Converts string arguments from test steps into specific data types or objects before they reach the method definition.
  • Test Suite Execution - Provides a command-line interface to execute specific features, scenarios, or full test suites.
  • Targeted Test Execution - Enables the execution of a designated subset of tests rather than the entire collection to isolate functional areas.
  • Test Context Sharing - Allows different test context classes to share data and references during the setup phase.

Star history

Star history chart for behat/behatStar history chart for behat/behat

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does behat/behat do?

Behat is a behavior-driven development framework and test automation tool for PHP. It functions as a Gherkin test runner that maps natural language feature files to executable PHP methods to verify that software implementation aligns with business requirements.

What are the main features of behat/behat?

The main features of behat/behat are: Behavioral Testing Tools, Behavior Driven Development, Gherkin-based Testing, Step-to-Code Mappings, Browser Driver Abstractions, Step Definition Contexts, Acceptance Testing, Automation Frameworks.

What are some open-source alternatives to behat/behat?

Open-source alternatives to behat/behat include: codeception/codeception — Codeception is a full-stack testing framework for PHP applications that provides a unified interface for unit,… cucumber/cucumber-js — Cucumber-js is a behavior-driven development tool and acceptance test automation framework for JavaScript. It serves… devexpress/testcafe — TestCafe is a Node.js end-to-end web testing framework used to automate browser tests with JavaScript or TypeScript.… codeception/codeceptjs — CodeceptJS is a Node.js end-to-end testing framework used for writing acceptance and functional tests for web and… thomhurst/tunit — TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source… jnicklas/capybara — Capybara is a browser automation testing library and framework for web application acceptance testing. It provides a…

Open-source alternatives to Behat

Similar open-source projects, ranked by how many features they share with Behat.
  • codeception/codeceptionCodeception avatar

    Codeception/Codeception

    4,855View on GitHub↗

    Codeception is a full-stack testing framework for PHP applications that provides a unified interface for unit, functional, and acceptance testing. It serves as a tool for automating real desktop and mobile browsers via the WebDriver protocol and acts as a client for testing REST and SOAP APIs. The framework is distinguished by its support for Behavior-Driven Development, allowing users to write human-readable test specifications in Gherkin language to align technical tests with business requirements. It implements actor-based action mapping to connect these natural language steps to executabl

    PHP
    View on GitHub↗4,855
  • cucumber/cucumber-jscucumber avatar

    cucumber/cucumber-js

    5,350View on GitHub↗

    Cucumber-js is a behavior-driven development tool and acceptance test automation framework for JavaScript. It serves as a test automation engine that allows users to define system behavior using human-readable scenarios, mapping plain-text steps to executable code to verify that software conforms to business rules and acceptance criteria. The project utilizes a Gherkin-based framework to create executable system documentation in natural language. It supports multi-language localization for writing scenarios in various spoken languages and provides tools for scenario parameterization and busin

    TypeScriptcucumberjavascripttypescript
    View on GitHub↗5,350
  • devexpress/testcafeDevExpress avatar

    DevExpress/testcafe

    9,904View on GitHub↗

    TestCafe is a Node.js end-to-end web testing framework used to automate browser tests with JavaScript or TypeScript. It serves as a cross-browser testing tool and a command-line execution engine designed for integration into continuous integration pipelines. The framework supports behavior-driven development by mapping human-readable Gherkin syntax to automation logic. It also includes an integrated web accessibility auditor to identify violations within web applications. The toolset covers a broad range of automation capabilities, including parallel test execution across multiple browser in

    JavaScript
    View on GitHub↗9,904
  • codeception/codeceptjscodeception avatar

    codeception/codeceptjs

    4,223View on GitHub↗

    CodeceptJS is a Node.js end-to-end testing framework used for writing acceptance and functional tests for web and mobile applications. It functions as an automated browser testing suite and cross-browser automation engine that allows users to simulate end-user interactions and verify page content using a JavaScript-based domain-specific language. The framework implements a behavior-driven development approach, enabling the creation of scenario-driven tests that describe application behavior in a human-readable format. It utilizes the page object model to encapsulate UI elements and logic into

    JavaScript
    View on GitHub↗4,223
  • See all 30 alternatives to Behat→