Simple cucumber like test runner.
The goal of this project is to provide a simple way to write cucumber tests for your C++ projects. Other projects like cucumber-cpp could already do that, but they add a huge amount of complexity for your tests. Like using ruby in your CI environment and handle running multiple processes.
Here are the benefits listed:
- no external dependencies beside c++11 compiler
- no ruby required
- single process
- parallel test execution
- simple debugging
Gurkenlaeufer has three parts:
- Simple gherkin file parser
- Test step framework
- Test runner
The gherkin file parser takes lines as a input usually read from a feature files. Here it is up to the user where the line come from. As simple file parser is provided.
The test step framework helps you defining you test steps. With a regex you can match steps and with captured you get access to variable parameters.
The test runner uses the google-test framework. From the parsed test cases multiple google tests will be created. This enables you using all the test features google-test gives you for your cucumber tests. Like running tests in parallel and generating junit output.
- Scenarios
- Background
- Scenario Outline with examples
- Before and After hooks
- Doc strings
- disable scenarios with @ignore tag
To replace cucumber-cpp with gurkenlaeufer you have to do the following:
#include "gurkenlaeufer/Step.h"
instead of cucumber-cpp for your step definitions- replace
cucumber::ScenarioScope<Context> Ctx;
bygurkenlaeufer::ScenarioScope<Context> Ctx(this);
Take a look into the TestSteps_cucumber_cpp.