Alternatives to PHPUnit logo

Alternatives to PHPUnit

Codeception, Behat, Kahlan, PhpSpec, and Selenium are the most popular alternatives and competitors to PHPUnit.
853
266
+ 1
14

What is PHPUnit and what are its top alternatives?

PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks.
PHPUnit is a tool in the Testing Frameworks category of a tech stack.
PHPUnit is an open source tool with 18.9K GitHub stars and 2.1K GitHub forks. Here’s a link to PHPUnit's open source repository on GitHub

Top Alternatives to PHPUnit

  • Codeception
    Codeception

    Full-stack testing framework for PHP. Run browsers tests, framework tests, APIs tests, unit tests with ease. ...

  • Behat
    Behat

    It is an open source Behavior-Driven Development framework for PHP. It is a tool to support you in delivering software that matters through continuous communication, deliberate discovery and test-automation. ...

  • Kahlan
    Kahlan

    It is a full-featured Unit & BDD test framework a la RSpec/JSpec which uses a describe-it syntax and moves testing in PHP one step forward. ...

  • PhpSpec
    PhpSpec

    It is a tool which can help you write clean and working PHP code using behaviour driven development or BDD. BDD is a technique derived from test-first development. ...

  • Selenium
    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. ...

  • JUnit
    JUnit

    JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks. ...

  • xUnit
    xUnit

    It is a free, open source, community-focused unit testing tool for the .NET Framework. It is the latest technology for unit testing C#, F#, VB.NET and other .NET languages. It works with ReSharper, CodeRush, TestDriven.NET and Xamarin. ...

  • Moq
    Moq

    It is a mocking library for .NET developed from scratch to take full advantage of .NET Linq expression trees and lambda expressions, which makes it the most productive, type-safe and refactoring-friendly mocking library available. And it supports mocking interfaces as well as classes. ...

PHPUnit alternatives & related posts

Codeception logo

Codeception

113
100
3
Elegant and Efficient Testing for PHP
113
100
+ 1
3
PROS OF CODECEPTION
  • 3
    Easy to get up and running some simple tests
CONS OF CODECEPTION
    Be the first to leave a con

    related Codeception posts

    Behat logo

    Behat

    97
    61
    2
    A BDD framework for testing your business expectations
    97
    61
    + 1
    2
    PROS OF BEHAT
    • 1
      BDD Acceptance Testing
    • 1
      Easy Ubiquitous language integration reusing code
    CONS OF BEHAT
      Be the first to leave a con

      related Behat posts

      Shared insights
      on
      BehatBehatPHPUnitPHPUnit

      What is the best solution (PHPUnit or Behat) for test automation (unit and functional tests)?

      See more
      Kahlan logo

      Kahlan

      1
      5
      0
      A full-featured Unit & BDD test framework
      1
      5
      + 1
      0
      PROS OF KAHLAN
        Be the first to leave a pro
        CONS OF KAHLAN
          Be the first to leave a con

          related Kahlan posts

          PhpSpec logo

          PhpSpec

          127
          25
          3
          A toolset for behavior driven development
          127
          25
          + 1
          3
          PROS OF PHPSPEC
          • 1
            BDD Unit Testing
          • 1
            Better for code optimisation (BDD over TDD)
          • 1
            Mocked dependant services by default
          CONS OF PHPSPEC
          • 1
            Less support; devs are more used to PHP Unit

          related PhpSpec posts

          Selenium logo

          Selenium

          14K
          11K
          522
          Web Browser Automation
          14K
          11K
          + 1
          522
          PROS OF SELENIUM
          • 172
            Automates browsers
          • 154
            Testing
          • 101
            Essential tool for running test automation
          • 24
            Remote Control
          • 24
            Record-Playback
          • 8
            Data crawling
          • 7
            Supports end to end testing
          • 6
            Functional testing
          • 6
            Easy set up
          • 4
            The Most flexible monitoring system
          • 3
            End to End Testing
          • 3
            Easy to integrate with build tools
          • 2
            Comparing the performance selenium is faster than jasm
          • 2
            Record and playback
          • 2
            Compatible with Python
          • 2
            Easy to scale
          • 2
            Integration Tests
          • 0
            Integrated into Selenium-Jupiter framework
          CONS OF SELENIUM
          • 8
            Flaky tests
          • 4
            Slow as needs to make browser (even with no gui)
          • 1
            Update browser drivers

          related Selenium posts

          Kamil Kowalski
          Lead Architect at Fresha · | 28 upvotes · 1.8M views

          When you think about test automation, it’s crucial to make it everyone’s responsibility (not just QA Engineers'). We started with Selenium and Java, but with our platform revolving around Ruby, Elixir and JavaScript, QA Engineers were left alone to automate tests. Cypress was the answer, as we could switch to JS and simply involve more people from day one. There's a downside too, as it meant testing on Chrome only, but that was "good enough" for us + if really needed we can always cover some specific cases in a different way.

          See more
          Benjamin Poon
          QA Manager - Engineering at HBC Digital · | 8 upvotes · 954.4K views

          For our digital QA organization to support a complex hybrid monolith/microservice architecture, our team took on the lofty goal of building out a commonized UI test automation framework. One of the primary requisites included a technical minimalist threshold such that an engineer or analyst with fundamental knowledge of JavaScript could automate their tests with greater ease. Just to list a few: - Nightwatchjs - Selenium - Cucumber - GitHub - Go.CD - Docker - ExpressJS - React - PostgreSQL

          With this structure, we're able to combine the automation efforts of each team member into a centralized repository while also providing new relevant metrics to business owners.

          See more
          JUnit logo

          JUnit

          3.8K
          557
          0
          A programmer-oriented testing framework for Java
          3.8K
          557
          + 1
          0
          PROS OF JUNIT
            Be the first to leave a pro
            CONS OF JUNIT
              Be the first to leave a con

              related JUnit posts

              We are looking for a Testing Tool that can integrate with Java/ React/ Go/ Python/ Node.js. Which amongst the three tools JUnit, NUnit & Selenium would be the best for this use case?

              See more
              Joshua Dean Küpper
              CEO at Scrayos UG (haftungsbeschränkt) · | 1 upvote · 434.8K views

              We use JUnit for our Java Unit and Integration tests in Version 5. Combined with @JMockit2 and @truth (from Google) we perform all kinds of tests on our minecraft, standalone and microservice architecture.

              We prefer JUnit over TestNG because of the bigger community, better support and the generally more agile development. JUnit integrates nicely with most software, while TestNG support is a little more limited.

              See more
              xUnit logo

              xUnit

              2.7K
              104
              0
              An open source, community-focused unit testing tool
              2.7K
              104
              + 1
              0
              PROS OF XUNIT
                Be the first to leave a pro
                CONS OF XUNIT
                  Be the first to leave a con

                  related xUnit posts

                  Moq logo

                  Moq

                  2.4K
                  19
                  0
                  The most popular and friendly mocking framework for .NET
                  2.4K
                  19
                  + 1
                  0
                  PROS OF MOQ
                    Be the first to leave a pro
                    CONS OF MOQ
                      Be the first to leave a con

                      related Moq posts