# A silent cucumber?

**URL:** <https://www.ruby-forum.com/t/a-silent-cucumber/161475>\
**Category:** RSpec\
**Created:** [February 26, 2009, 7:57pm UTC](https://www.ruby-forum.com/t/a-silent-cucumber/161475 "2009-02-26T19:57:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [February 26, 2009, 7:57pm UTC](https://www.ruby-forum.com/t/a-silent-cucumber/161475/1 "2009-02-26T19:57:42Z")

</div>

I believe that what I am trying to do should be possible, but I cannot  
seem to find the right combination of switches to get cucumber to run  
silently and only print the failing and pending steps. I do not have a  
cucumber.yml file

I have tried the following (from the project root):

$ cucumber -q  
…  
0 scenarios

If I run rake features then I have 29 scenarios.

$ cucumber -q features  
…  
29 scenarios  
29 steps failed  
125 steps skipped  
22 steps pending (22 with no step definition)

If I run rake features then 172 steps pass 3 are skipped and 1 is  
pending

$ cucumber -q -r features features  
…  
Pending Notes:  
And /entity named “(._)" (is|is not) an? "(._)”/ (TODO) #  
features/app/models/entities/step\_definitions/entity\_steps.rb:20

29 scenarios  
172 steps passed  
3 steps skipped  
1 step pending

Close, but I still see all of the feature scenarios and steps, just not  
the files that they come from.

Is there a way to only display the step detail for feature scenarios  
that contain failing or pending steps?

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [February 27, 2009, 6:02pm UTC](https://www.ruby-forum.com/t/a-silent-cucumber/161475/2 "2009-02-27T18:02:20Z")

</div>

On 26 Feb 2009, at 18:57, James B. wrote:

> Is there a way to only display the step detail for feature scenarios  
> that contain failing or pending steps?

I think you’ll have to write your own formatter.

It’s pretty easy - take a look at the examples in lib/cucumber/  
formatter for some pointers.

Matt W.

> **[Tea-Driven Development – Matt Wynne taking it one tea at a time](http://blog.mattwynne.net)**

> **[Find the Best Concerts Near You, Tour Dates & Tickets Worldwide | Songkick](https://www.songkick.com)**
>
> Find live music near you, track your favorite artists, get instant concert alerts and buy tickets for all the best upcoming concerts.

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [February 27, 2009, 7:39pm UTC](https://www.ruby-forum.com/t/a-silent-cucumber/161475/3 "2009-02-27T19:39:23Z")

</div>

Matt W. wrote:

> I think you’ll have to write your own formatter.

Actually, after looking at the code I discover that the existing  
progress formatter does just about what I was looking for.

Thanks for the pointer.

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [February 27, 2009, 6:03pm UTC](https://www.ruby-forum.com/t/a-silent-cucumber/161475/4 "2009-02-27T18:03:11Z")

</div>

Matt W. wrote:

> On 26 Feb 2009, at 18:57, James B. wrote:
> 
> > Is there a way to only display the step detail for feature scenarios  
> > that contain failing or pending steps?
> 
> I think you’ll have to write your own formatter.
> 
> It’s pretty easy - take a look at the examples in lib/cucumber/  
> formatter for some pointers.

Thanks.
