Software Alternatives & Startups

Behat VS Codeception

Compare Behat VS Codeception and see what are their differences

Behat

Behat is a tool that makes behavior driven development (BDD) possible.

Behat Landing page
Rating
0 reviews
Codeception

Codeception is a new full-stack testing PHP framework.

Codeception Landing page
Rating
0 reviews
Pricing
Open source
Note: These products don't have any matching categories. If you think this is a mistake, please edit the details of one of the products and suggest appropriate categories.

Which is more popular?

Based on our record, Codeception should be more popular than Behat. It has been mentioned 8 times since March 2021.

social mentions
4 vs 8
Developer Tools popularity
100% vs 0%
alternatives listed
71 vs 62

Base details

Website, pricing, platforms and company facts side by side.

Behat
Codeception
Website docs.behat.org codeception.com
Pricing
Open source
Listed in

Features and specs

What each product offers, as listed by its team.

Behat 5 features
Codeception 5 features
  • Behavior-Driven Development (BDD) Support
    Behat is specifically designed for Behavior-Driven Development, enabling teams to write understandable and business-readable tests that facilitate a better understanding among developers, testers, and non-technical stakeholders.
  • Gherkin Language Integration
    It uses the Gherkin language which allows the creation of test scenarios that are easy to read and write. This makes it accessible for non-technical stakeholders to understand the tests.
  • Community and Ecosystem
    Behat has a strong community and a wide range of plugins and extensions available to enhance its functionality, such as Mink for browser automation and integrations with other tools.
  • PHP Compatibility
    As Behat is developed in PHP, it seamlessly integrates with PHP projects, making it a preferred choice for testing within the PHP ecosystem.
  • Encourages Collaboration
    By making test scenarios comprehensible to non-developers, Behat encourages collaboration between cross-functional teams, enhancing communication and shared understanding of project requirements.

Possible disadvantages

  • Steep Learning Curve
    There can be a significant learning curve for those unfamiliar with BDD concepts or the Gherkin language, requiring time and effort to master.
  • Limited to PHP Projects
    Behat is PHP-centric, which means its utility is predominantly for PHP applications. It might not be the best choice for projects written in other programming languages unless PHP is heavily involved.
  • Infrastructure Requirements
    Setting up Behat, especially with browser automation tools like Selenium via Mink, may require additional infrastructure and configurations which can be complex.
  • Execution Speed
    BDD-style tests with Behat can be slower to execute compared to unit tests, as they often involve more setup and teardown work in simulating user interactions.
  • Overhead for Small Projects
    The additional abstraction and ceremony provided by BDD tools like Behat may introduce unnecessary overhead for smaller projects where simpler testing methods might suffice.
  • Unified Testing Framework
    Codeception allows you to write tests for unit, functional, and acceptance testing in one framework, offering a consistent interface and reducing the need to switch between tools.
  • BDD Support
    Codeception supports Behavior Driven Development (BDD) which enables writing human-readable test scenarios, making it easier for non-developers to understand test cases.
  • Modular Architecture
    Codeception’s modular architecture makes it highly extensible and customizable, allowing the reuse of modules and integration with popular frameworks like Symfony, Laravel, and Yii.
  • Comprehensive Suite of Helpers
    It offers a wide range of helper modules for various tasks and integrations, such as interacting with web pages and SOAP/REST APIs, which simplifies the setup of tests.
  • Active Community and Documentation
    Codeception has an active community and comprehensive documentation, which provides support and examples for most use cases.

Possible disadvantages

  • Complex Setup for Beginners
    The flexibility and feature set of Codeception might be overwhelming for newcomers, requiring more time to understand and correctly set up the environment.
  • Steep Learning Curve
    Codeception’s comprehensive range of functionalities and modularity may result in a steeper learning curve compared to simpler testing frameworks.
  • Overhead for Small Projects
    For small projects, Codeception might be an overkill due to its complex configuration and multitude of features, which might not all be needed.
  • Heavy Dependency on PHP
    As Codeception is a PHP-based testing framework, teams using multiple languages or technologies might require separate solutions for non-PHP environments.
  • Performance Overhead
    Running complete acceptance tests through browsers can lead to performance overhead, especially for large test suites, possibly requiring more infrastructure and time.

Videos

Walkthroughs and reviews on video.

Behat 3 videos + Add
Codeception 3 videos + Add

Behat for Beginners: Automated Testing in 5 Easy Steps

More videos

  • Review - Making your life easier with Behat + Mink + Drupal Extension
  • Review - Lessons Learned from 2+ Years of Using Behat

Our First Acceptance Test [6/24] Codeception & Symfony2

More videos

  • Tutorial - How to Run Codeception Tests [5/24] Codeception & Symfony2
  • Review - Bootstrapping Codeception [2/24] Codeception & Symfony2

Category popularity

How often each product is chosen within a category, 0–100% relative to the other.

Score bands 0–20 21–40 41–50 51–60 61–100
Behat
Codeception
100% 100%
0% 0%
19% 19%
81% 81%
100% 100%
0% 0%
0% 0%
100% 100%

User comments

Share your experience with using Behat and Codeception. For example, how are they different and which one is better?

Log in or Post with

Social recommendations and mentions

Recommendations tracked on public social media and blogs since March 2021.

Behat 4 mentions
Codeception 8 mentions
  • How to migrate from Api Platform v2 to v3?
    Before updating Api Platform, you should make sure that your Api Platform routes are fully covered by tests. You can define integration tests with PHPUnit, Behat or Pest, depending on the tool you’re most comfortable with. - Source: dev.to / almost 3 years ago
  • PHPUnit, do i need to learn it?
    Behat: https://docs.behat.org/en/latest/ Following: Behaviour Driven Development. Source: over 3 years ago
  • How I added zero down deployment to my website
    ^ That's an example of the type of behavioral test I use. I use Behat (beha[vioral]t[est]) to run these, and it does so by opening a headless Chrome / Firefox and does the actual clicking through the real live website. Super useful to... Source: over 4 years ago

View more

  • Any pro-tips for writing automated tests with Selenium PHP?
    Personal experience: - don’t use Behat unless you really needed a “story telling”, it has a intermediate layer Gherkin that you’ll need to code. You can write “Given/When/Then” steps but you’ll also need to write “php code” that will... Source: over 3 years ago
  • PHPUnit, do i need to learn it?
    Codeception: https://codeception.com/. Source: over 3 years ago
  • Advice for an older symfony 4.4 project
    I would say to check out Codeception. Codeceptions has modules for Symfony and database generally. Long and short of it is that if you want you can run api tests that go into the controllers and rollback the database afterwards. Source: about 4 years ago

View more

Alternatives to Behat and Codeception

When comparing Behat and Codeception, you can also consider the following products.