Need advice about which tool to choose?Ask the StackShare community!

Cucumber

762
715
+ 1
25
PHPUnit

623
221
+ 1
11
Add tool

Cucumber vs PHPUnit: What are the differences?

Developers describe Cucumber as "Simple, human collaboration". Cucumber is a tool that supports Behaviour-Driven Development (BDD) - a software development process that aims to enhance software quality and reduce maintenance costs. On the other hand, PHPUnit is detailed as "Testing framework for PHP". PHPUnit is a programmer-oriented testing framework for PHP It is an instance of the xUnit architecture for unit testing frameworks..

Cucumber and PHPUnit can be primarily classified as "Testing Frameworks" tools.

Cucumber and PHPUnit are both open source tools. It seems that PHPUnit with 14.3K GitHub stars and 1.75K forks on GitHub has more adoption than Cucumber with 2.54K GitHub stars and 501 GitHub forks.

OpenGov, Viadeo, and Ubiqua are some of the popular companies that use Cucumber, whereas PHPUnit is used by Geocodio, Index.co, and Clippings. Cucumber has a broader approval, being mentioned in 58 company stacks & 39 developers stacks; compared to PHPUnit, which is listed in 43 company stacks and 30 developer stacks.

Get Advice from developers at your company using Private StackShare. Sign up for Private StackShare.
Learn More
Pros of Cucumber
Pros of PHPUnit
  • 18
    Simple Syntax
  • 3
    Simple usage
  • 2
    Nice report
  • 2
    Huge community
  • 3
    TDD Unit Testing
  • 2
    TDD Acceptance Testing
  • 2
    TDD Integration Testing
  • 1
    The de facto standard for xUnit testing in PHP
  • 1
    TDD Unit Testing
  • 1
    Unit Testing
  • 1
    Software Quality

Sign up to add or upvote prosMake informed product decisions

Cons of Cucumber
Cons of PHPUnit
    Be the first to leave a con
    • 1
      Mocked services require more effort and understanding

    Sign up to add or upvote consMake informed product decisions

    What is Cucumber?

    Cucumber is a tool that supports Behaviour-Driven Development (BDD) - a software development process that aims to enhance software quality and reduce maintenance costs.

    What is PHPUnit?

    PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Cucumber?
    What companies use PHPUnit?
    See which teams inside your own company are using Cucumber or PHPUnit.
    Sign up for Private StackShareLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Cucumber?
    What tools integrate with PHPUnit?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to Cucumber and PHPUnit?
    Selenium
    Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well.
    RSpec
    Behaviour Driven Development for Ruby. Making TDD Productive and Fun.
    TestNG
    It is a testing framework designed to simplify a broad range of testing needs, it covers all categories of tests: unit, functional, end-to-end, integration, etc.Run your tests in arbitrarily big thread pools with various policies available (all methods in their own thread, one thread per test class, etc.
    JUnit
    JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks.
    Celery
    Celery is an asynchronous task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports scheduling as well.
    See all alternatives