Get details of failed tests while the suite is running and not only at the end

21 views
Skip to first unread message

Panayotis Matsinopoulos

unread,
Mar 21, 2014, 4:35:58 AM3/21/14
to rs...@googlegroups.com
Hi,

While running rspec I am getting output like this:


..FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF...............


and at the end, I am getting detailed list of the problems.

Question: How can I get the details of a failure before the whole suite finishes and at the failure point on each test?

I would like to see the output while running the suite as follows:

..F
<details of failure .... Test + error e.t.c.>
F
<details of failure .... Test + error e.t.c.>
......F
<details of failure .... Test + error e.t.c.>
......F
<details of failure .... Test + error e.t.c.>
.................


Is that clear?

Any help?

Panayotis


Aaron Kromer

unread,
Mar 21, 2014, 11:45:52 AM3/21/14
to rs...@googlegroups.com

Hi Panayotis,

There currently isn’t a default formatter which does that. Can you explain a bit more behind the why of this type of output? For me, this type of output would be a tad jarring to see.

There is an option you can set to fail_fast so the suite stops at the first failing spec. Additionally, you can pass the flag --fail-fast flag on the command line when you run RSpec.

Cheers!



--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/fe841952-0461-4b18-bdd1-3671ec60ff3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Myron Marston

unread,
Mar 21, 2014, 11:47:55 PM3/21/14
to rs...@googlegroups.com
There are several 3rd party formatters that provide this:


HTH,
Myron

Panayotis Matsinopoulos

unread,
Mar 24, 2014, 5:00:43 AM3/24/14
to rs...@googlegroups.com
--fail-fact works fine for me. Thanks a lot.

Panayotis Matsinopoulos

unread,
Mar 24, 2014, 5:02:37 AM3/24/14
to rs...@googlegroups.com
Thanks for these. Really useful.
Reply all
Reply to author
Forward
0 new messages