cucumber-ruby icon indicating copy to clipboard operation
cucumber-ruby copied to clipboard

The pretty formatter does not report rules

Open aurelien-reeves opened this issue 4 years ago • 5 comments

From a Slack conversation here: https://cucumberbdd.slack.com/archives/C7676D8GN/p1622078810002700

When running $ cucumber --format pretty on a file that uses the “Rule” keyword, with Cucumber 6, should I be seeing the Rules print out to the console along with the Features and Scenarios? I have my file formatted like this:

Feature: ...
  Rule: ...
    Scenario: ...
      Given
      When
      Then

But I am not seeing the Rules print out to the console.

Note: the pretty formatter is hard to maintain

Suggestion: having the pretty formatter rewritten into the monorepo to use shared testdata and have a consistent behavior in different languages.

aurelien-reeves avatar May 28 '21 07:05 aurelien-reeves

If we do this, it we should also consider how we support Markdown.

Markdown produces the same AST as Gherkin classic, so as long as the formatter uses the AST there would be no special considerations.

Another way to support Markdown is to pribt the source, but with additional Markup to represent results. That way the output would be valid Markdown with results, and without the need for JavaScript to render it.

aslakhellesoy avatar May 28 '21 07:05 aslakhellesoy

I am confused here. May the pretty formatter be used for something else than plain text primarily to stdout?

aurelien-reeves avatar May 28 '21 07:05 aurelien-reeves

The output would be human readable, but if you chose to redirect it to a file, it could also be rendered by a markdown processor.

aslakhellesoy avatar May 28 '21 08:05 aslakhellesoy

Ok, thanks for the clarification 🙂

aurelien-reeves avatar May 28 '21 08:05 aurelien-reeves

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two months if no further activity occurs.

stale[bot] avatar Apr 14 '23 10:04 stale[bot]