Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy authored Oct 25, 2020
1 parent 64b255e commit ef545aa
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions demo-formatter/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,16 @@
# Cucumber Demo Formatter

Examples of standalone formatters that produce output from `protobuf` formatters
or [fake-cucumber](../fake-cucumber)
This is a very simple implementation of a dtandalone Cucumber formatter. It reads messages generated by Cucumber's `message` formatter from `STDIN` and writes a report to `STDOUT`.

If you are writing a new formatter, copy this code as a starting point.

## Usage

You'll need a `cucumber-messages.bin` file with messages that your formatter can process.
The simplest way to generate one of these is to run [fake-cucumber](../fake-cucumber)
over the `.feature` files used as test data in [gherkin](../gherkin/testdata/good):

```
npm install -g fake-cucumber
cd ../gherkin
fake-cucumber --results=random testdata/good/*.feature > ../demo-formatter/cucumber-messages.bin
cd ../demo-formatter
ls -al
```

You now have a `cucumber-messages.bin` file. Let's process it with our formatter:
You'll need a `messages.ndjson` file with messages that your formatter can process.
The simplest way to generate one of these is to use Cucumber's built-in `message` formatter.

### Ruby

```
cat cucumber-messages.bin | ruby/bin/cucumber-demo-formatter
cat messages.ndjson | ruby/bin/cucumber-demo-formatter
```

0 comments on commit ef545aa

Please sign in to comment.