Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 2.06 KB

README.md

File metadata and controls

42 lines (31 loc) · 2.06 KB

gurkenlaeufer

Simple cucumber like test runner.

Build Status Build status

What it does for you

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

How this is achieved

Gurkenlaeufer has three parts:

  1. Simple gherkin file parser
  2. Test step framework
  3. 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.

Supported Features

  • Scenarios
  • Background
  • Scenario Outline with examples
  • Before and After hooks
  • Doc strings
  • disable scenarios with @ignore tag

cucumber-cpp adaption layer

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; by gurkenlaeufer::ScenarioScope<Context> Ctx(this); Take a look into the TestSteps_cucumber_cpp.