forked from cucumber/common
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64b255e
commit ef545aa
Showing
1 changed file
with
4 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |