Skip to content

Remove prints to stdout when using --report-json #106

@ThoSe1990

Description

@ThoSe1990

When using --report-json with or without a file creates the prints to stdout. This is unfortunate when piping the output to another program like ./build/bin/example ./examples/features/1_first_scenario.feature --report-json | my-cucumber-consumer

Lets remove all prints to stdout here.

./build/bin/example ./examples/features/1_first_scenario.feature --report-json:

Feature: My first feature  ./examples/features/1_first_scenario.feature:1

Scenario: First Scenario  ./examples/features/1_first_scenario.feature:4
[   PASSED    ] Given An empty box  ./examples/features/1_first_scenario.feature:5
[   PASSED    ] When I place 1 x "apple" in it  ./examples/features/1_first_scenario.feature:6
[   PASSED    ] Then The box contains 1 item  ./examples/features/1_first_scenario.feature:7

Scenario: Alternative Words  ./examples/features/1_first_scenario.feature:9
[   PASSED    ] Given An empty box  ./examples/features/1_first_scenario.feature:10
[   PASSED    ] When I place 1 x "banana" in it  ./examples/features/1_first_scenario.feature:11
[   PASSED    ] Then 1 item is "banana"  ./examples/features/1_first_scenario.feature:12
[   PASSED    ] And I place 1 x "banana" in it  ./examples/features/1_first_scenario.feature:13
[   PASSED    ] Then 2 items are "banana"  ./examples/features/1_first_scenario.feature:14

...here begins the json output now...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions