From ef545aa0eb247c764554bc90ffce368c1f388176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aslak=20Helles=C3=B8y?= <1000+aslakhellesoy@users.noreply.github.com> Date: Sun, 25 Oct 2020 23:24:47 +0000 Subject: [PATCH] Update README.md --- demo-formatter/README.md | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/demo-formatter/README.md b/demo-formatter/README.md index ff82aefe59..2586a9aa7e 100644 --- a/demo-formatter/README.md +++ b/demo-formatter/README.md @@ -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 ```