A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch) (by catchorg)

Catch Alternatives

Similar projects and alternatives to Catch

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better Catch alternative or higher similarity.

Suggest an alternative to Catch

Reviews and mentions

Posts with mentions or reviews of Catch. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-12-24.
  • How do I properly unit-test a class or module?
    3 projects | | 24 Dec 2021
    First of all, use a testing library, it makes life a lot easier. I mostly use You can pass cli args to specify which tests to run, and it makes things a whole lot simpler.
  • Oof: Manipulate (RGB) color, position and more of console output in a single C++ header library
    4 projects | | 21 Nov 2021
    I'll just give you two links: CMake tutorial: . Shouldn't take years to complete Catch2 doc: . They briefly explain why they finally moved away from header only
  • Github Action
    3 projects | | 19 Nov 2021
    Finally, I moved onto working on Kien's potato SSG. His setup with catch2 is similar to mine, we both have it set up to provide us a main which we compile separately when we want to test it, rather than having it integrated into the program all the time. This made it easy to get started on his, I read his which specified one should create a new source file to write their desired test cases, which I did. After messing around with file paths for a bit and figuring out how to get my test to pass, I pushed a commit and created a pull request with a test for his HTMLFile.getTitle() function. Unfortunately I realized with the workflow he had set up this wouldn't trigger his CI so I opted to insert my test case in test.cpp instead to see if it passed his workflow, which thankfully it did.
  • Testing
    2 projects | | 12 Nov 2021
    For my part I added some testing capabilities to my SSG using Catch2. Catch2 was super easy to set up and involved downloading one header file from their github repo and including it in my program. There are a number of ways you can choose to have Catch interact with your project, either by having Catch define your main i.e
  • Adding tests to LENNAH
    1 project | | 11 Nov 2021
    Since LENNAH is written in C++ I had to look around for a good unit testing framework and I came across Catch2. Catch2 is a very easy to use testing framework because all you need to do is add a single header file to your project then #define and #include it! This was the main reason I wanted to use this framework, because I saw a lot of people online recommend it since it is quick to set up and easy to use. And they are absolutely right about that, it only need two lines of code to set it up.
  • Catch2 - Testing Framework
    2 projects | | 11 Nov 2021
    I downloaded catch.hpp file from Catch2 Repo.
  • Unit testing and mocking for c++
    6 projects | | 19 Oct 2021
    I'm answering a question asked not from me. I've used both Google.Test and Catch2 and latter one feels much nicer. Sections from Catch2 just do not exist in other frameworks however they are super powerful. It has drawbacks like not having out of the box macros for setting up stuff once for all the runs of a test before a test is run with various parameters. See Integrating gmock should be easy as I've seen but not flawless. As I remember some extra work needs to be done so expectations are verified at end of sections? See Google.Test doesn't support (or at least didn't when I last looked) some combination of type and value generators. Other than that, the slightly uglier syntax and lack of sections (which is pretty big) it's all good. Especially with gmock all integrated and delivered to you in one package.
  • How should I make tests?
    2 projects | | 26 Sep 2021
    Maybe you would be interested in Catch2. I have been using it in all my projects, its pretty good.
  • Unit testing and mocks in C++
    2 projects | | 8 Sep 2021
    Catch2 and Google Test are pretty much the gold standards. Any unittest framework should integrate into your IDE (although I personally don't use CLion).
  • Testing Frameworks for C++, ESP32
    4 projects | | 1 Sep 2021
    That is one of the framework that we are considering:
  • [Code Review] Template Stack Container in C++ for Embedded Systems
    1 project | | 15 Jul 2021
    You need unit tests. IMO code is not usable unless there are unit tests binding the behavior. Catch2 is a good library if you don't have any opinions.
  • Projects that use ctest?
    1 project | | 29 May 2021
  • Presenting a C++ project on Github elegantly
    6 projects | | 7 May 2021
  • What’s the differences and/or changes between Catch and Catch2?
    1 project | | 14 Apr 2021
    Catch(1) is still available in the Catch2 repo in the Catch1.x branch. It must be used if your project is still on C++03.
  • Resurse C/C++?
    8 projects | | 8 Apr 2021


Basic Catch repo stats
9 days ago

catchorg/Catch2 is an open source project licensed under Boost Software License 1.0 which is an OSI approved license.

Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.
Find remote jobs at our new job board There are 28 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.