cucumber / cucumber-ruby

Cucumber for Ruby. It's amazing!

Home Page:https://cucumber.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The pretty formatter does not report rules

aurelien-reeves opened this issue · 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.

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.

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

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.

Ok, thanks for the clarification 🙂

commented

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.