Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verbose option for error reporting #268

Closed
MoonTahoe opened this issue Oct 25, 2014 · 3 comments
Closed

verbose option for error reporting #268

MoonTahoe opened this issue Oct 25, 2014 · 3 comments

Comments

@MoonTahoe
Copy link

Printing the entire stack trace of all errors and failures is pretty verbose. When you participate in BDD you actually want to watch the bindings fail first. It would be nice to see this all on one screen without the stack trace. Would it be possible to add an option to hide the stack trace from these reports?

@example

This failing scenario currently prints hundreds of lines of stack traces....

@Solution

Allow users to hide the stack traces...

        $ cucumber-js --format pretty --verbose false

        Scenario: Unique Images                  # features/bingocard.feature:11
              GET / 200 7.242 ms - 253
        When I request a new card at "/"       # features/bingocard.feature:7
        Then I should receive a car bingo card # features/bingocard.feature:8
              * AssertionError: Expected 1 elements matching 'table.bingo-card', found 0
        And No two images should be the same   # features/bingocard.feature:12

        (::) failed steps (::)
        AssertionError: Expected 1 elements matching 'table.bingo-card', found 0

        $ 
@djungowski
Copy link

As for assertions, I wrote a library for cucumber.js that hides the stacktraces and instead only outputs the actual error message: https://github.com/djungowski/cucumber-assert

Maybe this will help in your case.

@jbpros
Copy link
Member

jbpros commented Dec 21, 2014

Related to #157.

This is an interesting idea, thank you for sharing it! I was thinking of an intermediary approach where we would display only the first X lines of the stack trace. The reason for that is you usually need files and line numbers when doing BDD/TDD.

I recommend you give @djungowski's lib a try until we figure it all out on #157.

I'm closing this issue so that we keep the discussion centralised there.

@jbpros jbpros closed this as completed Dec 21, 2014
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants