How to Write a C++ Test Framework
A long time ago I had a question about how Googletest or Catch2 implement their macros to run all the unit tests they write. While writing the implementation for CWT-Cucumber: A C++ Cucumber Interpreter, I needed the same mechanism to achieve this particular behaviour. Registering functions before main is executed. In this article I write a proof of concept for a C++ test framework.
[C++] Start Using Cucucmber Part 2. This Time With CWT-Cucumber
I have implemented a Cucumber interpreter in C++20. CWT-Cucumber: A C++ Cucumber interpreter is my project for this and except for the rules I have implemented all Cucumber features to the best of my knowledge. In addition, there is a Conan recipe to create a Conan package. This means that there is now a native C++ Cucumber interpreter available without third party dependencies.
Crafting a Cucumber Interpreter in C/C++
I created a C/C++ Cucumber interpreter, based on “Crafting Interpreters” by Robert Nystrom. It compiles a feature file into byte code which is then executed by a vm. The interpreter implementation is C and there are no third party libraries needed to compile and use it. In addition I created C++ bindings to make it easier to use. Check out this article for my initial thoughts and check out the GitHub repository with the project and its examples.
[C++] Start Using Cucumber
The Cucumber Framewrok enables behavior driven development in your projects. Add tests in a given-when-then style which are readable for basically everyone. In this post we setup cucumber for C++ on a ubuntu machine with it’s dependencies. We’ll use googletest as testframework underneath