Catch2
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)
Learn how to implement test sharding in Catch2 for faster parallel test execution. Discover the `--shard-count` and `--shard-index` CLI flags for efficient test distribution.
How to Use a Custom Main Function with Catch2: Four Implementation PatternsMaster Catch2 custom main functions. Learn four implementation patterns to control test execution instead of linking Catch2Main. Boost your testing workflow today.
How to Configure Catch2 to Abort Tests on First FailureLearn how to configure Catch2 to abort tests on first failure using the -a command-line option. Stop your test runs instantly after the first failed assertion for faster debugging.
How to Use Wildcards in Tag Filtering with Catch2: A Complete GuideDiscover how to effectively filter tests in Catch2. Learn about wildcard usage for test names and the exact matching required for tag filtering.
How to Configure Output Coloring and Formatting in Catch2Learn to configure Catch2 output coloring and formatting using compile-time macros and runtime flags for custom terminal output and improved CI integration. Master your test results display.
How to Use Wildcards in Catch2 Test SpecificationsLearn to use wildcards in Catch2 test specifications with the asterisk (*) character. Filter tests flexibly by matching any part of a test name. Boost your testing efficiency today.
How to Implement Custom Exception Translators in Catch2Learn how to implement custom exception translators in Catch2 using the CATCH_TRANSLATE_EXCEPTION macro. Convert C++ exceptions to readable strings for better test output.
What's New in Catch2 v3 Compared to v2: Key Changes and Migration GuideExplore Catch2 v3! Discover key changes from v2 including static library builds C++14 support and faster compiles. Get your migration guide now.
How to Create Custom Test Fixtures in Catch2: A Complete GuideMaster custom test fixtures in Catch2. Learn to use macros for per-section, direct member function, and persistent state fixtures for robust C++ testing.
How to Use Tags and Test Filtering in Catch2: Complete GuideMaster Catch2 test filtering and tagging. Organize and execute specific tests with command-line expressions and logical operators for efficient C++ testing.
How Catch2 Test Case Registration Works Internally: Static Initialization and Registry ArchitectureDiscover how Catch2 test case registration works internally. Learn about static initialization and the registry architecture through the TEST_CASE macro.
How Auto-Registration Works with TEST_CASE Macros in Catch2: Inside the AutoReg MechanismDiscover how Catch2 automatically registers TEST_CASE macros at startup. Learn about the AutoReg mechanism and global initialization phase before main executes.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →