Support for writing Cucumber step definitions in C++ (building with Boost Build)
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 1 commit ahead, 309 commits behind cucumber:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Build Status

Cucumber-Cpp allows Cucumber to support step definitions written in C++.

If you need to ask a question, don't open a ticket on GitHub! Please post your question on the Cucumber discussion group instead, prefixing the title with [CPP].

The current library relies on a few libraries:

  • Boost 1.40 or later. Required libraries: thread, system, regex, and date_time. Optional library for Boost Test driver: test.
  • GTest 1.4 or later. Optional for the GTest driver.
  • CppSpec development branch. Optional for the CppSpec driver.
  • GMock 1.6 or later. Optional for the internal test suite.

This header-only library is included in the source code:

It might work with earlier versions of the libraries, but it was not tested with them.

Cucumber-Cpp uses the wire protocol at the moment, so you will need Cucumber-Ruby installed and available on the path.

Building tests and sample application:

Supposing you have a directory structure with src/boost_1_53_0 and src/cucumber-cpp,

cd src
echo "boost-build boost_1_53_0/tools/build/v2 ;" > boost-build.jam
cd cucumber-cpp

Running the example on Unix:

bin/examples/Calc/.../BoostCalculatorSteps >/dev/null &
cucumber examples/Calc/CalcFeatures

Running the example on Windows:

start bin\examples\Calc\...\BoostCalculatorSteps.exe
cucumber examples\Calc\CalcFeatures