more descriptive scenario failure output

40 views
Skip to first unread message

Stuart Gill

unread,
Jan 31, 2020, 1:06:09 PM1/31/20
to Behat

I have a few test suites and run them all nightly. This takes about an hour and tests 295 scenarios currently. The output is quite long-- there's a lot of testing against long JSON responses. At the end there's a summary of test failures that looks like this:

--- Failed scenarios:

    features/happy-path/metrics/conversions.feature:16
    features/happy-path/metrics/conversions.feature:190
    features/happy-path/metrics/digital.feature:76
    features/happy-path/metrics/digital.feature:97
    features/happy-path/metrics/digital.feature:108
    features/happy-path/metrics/digital.feature:129

etc...

and then:

295 scenarios (234 passed, 61 failed)
922 steps (861 passed, 61 failed)
58m18.43s (20.33Mb)

How can I get these "failed scenarios" to be more descriptive? For example, could they print the Scenario name, instead of just the line number as is currently done?


Thanks in advance!
Stuart

Andre Michel

unread,
Jan 31, 2020, 2:50:36 PM1/31/20
to be...@googlegroups.com
I depends on what you are want to archive? 
One way is to write a format extension that just echos your expected values.
This link is the simplest answer i could find:

Examples:



--
You received this message because you are subscribed to the Google Groups "Behat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to behat+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/behat/f5d8d3da-f5c6-45c8-9172-2748e33b0679%40googlegroups.com.

Stuart Gill

unread,
Jan 31, 2020, 7:29:56 PM1/31/20
to Behat
Those look like good options. Thank you for pointing me in the right direction Andre!
To unsubscribe from this group and stop receiving emails from it, send an email to be...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages