/cucumber-cpp

Support for writing Cucumber step definitions in C++

Primary LanguageC++MIT LicenseMIT

Cucumber-CPP

Join the chat at https://gitter.im/cucumber/cucumber-cpp

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].

It 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.6 or later. Optional for the GTest driver. By default downloaded and built by CMake.
  • CppSpec development branch. Optional for the CppSpec driver.
  • GMock 1.6 or later. Optional for the internal test suite. By default downloaded and built by CMake.
  • Qt 4. Optional for the CalcQt example.

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. It is also needed to run the functional test suite.

Building Cucumber-Cpp with tests and samples:

cmake -E make_directory build
cmake -E chdir build cmake -DCUKE_ENABLE_EXAMPLES=on ..
cmake --build build
cmake --build build --target test
cmake --build build --target features

Running the Calc example on Unix:

build/examples/Calc/BoostCalculatorSteps >/dev/null &
cucumber examples/Calc

Running the Calc example on Windows (NMake):

start build\examples\Calc\BoostCalculatorSteps.exe
cucumber examples\Calc