Skip to content

Commit

Permalink
Merge pull request #291 from erichstuder/wip
Browse files Browse the repository at this point in the history
add short explanation how it works to README.md
  • Loading branch information
ursfassler committed Mar 4, 2024
2 parents 58cb6fb + ccb6eee commit 7583400
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,27 @@ start build\examples\Calc\BoostCalculatorSteps.exe
cucumber examples\Calc
```

## The way it works
(This is a great explanation by [paoloambrosio](https://github.com/paoloambrosio) copied from [stackoverflow](https://stackoverflow.com/questions/50760865/cucumber-cpp-required-software-for-running-example))

The way Cucumber-CPP currently works is by having Cucumber-Ruby connecting to a TCP port where the C++ implementation is listening. When the wire protocol is defined in the cucumber.wire file, with host and port where your C++ wire protocol server is listening, Cucumber-Ruby will try and run them with Cucumber-CPP.

C++ is a compiled language, so step definitions must be compiled first. The examples provided use CMake, as described in the README. Cucumber-CPP needs to be linked to the step definitions and to everything that they use (usually the application under test), creating an executable file that will listen to the wire protocol port (defaults to localhost:3902) for Cucumber-Ruby to connect to (and exiting when it disconnects).

```
+------------------------------------------+
| |
+----------+ | +----------+ +----------+ +----------+ |
| | | | | | | | | |
| Cucumber | | | Cucumber | | C++ Step | | Your | |
| Ruby |--------->| CPP Wire |--| Defs |--| CPP App | |
| | | | Server | | | | | |
| | | | | | | | | |
+----------+ | +----------+ +----------+ +----------+ |
| |
+------------------------------------------+
```

## Getting started

Here is a basic example on how to get started with *cucumber-cpp*. First you need to create the basic feature structure:
Expand Down

0 comments on commit 7583400

Please sign in to comment.