• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cucumber / cucumber-ruby / 1732 / 2
94%
main: 94%

Build:
Build:
LAST BUILD BRANCH: master
DEFAULT BRANCH: main
Ran 19 Apr 2016 11:41PM UTC
Files 97
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Apr 2016 09:16PM UTC coverage: 93.314%. Remained the same
2.1

push

travis-ci

mattwynne
Run scenarios in fully random order (#970)

This documents the desired behaviour of the random order option across
multiple features and corrects the ordering of filters within runtime.rb
in order to run scenarios in a genuinely random order.

Previously, using --order=random resulted in the order of scenarios
being randomised within a feature, but features themselves always
proceeded in alphabetical (or ASCIIbetical) order based on their file
path, i.e.:

    Feature: 1
      Scenario: 1B
      Scenario: 1A

    Feature: 2
      Scenario: 2B
      Scenario: 2A

Although Randomizer does indeed shuffle the scenarios, it was followed
in the filter chain by LocationsFilter which groups scenarios by file
path. Moving Randomizer later in the chain avoids this.

Now, each scenario is run in random order regardless of the name or path
of the feature:

    Feature: 1
      Scenario: 1A

    Feature: 2
      Scenario: 2B
      Scenario: 2A

    Feature: 1
      Scenario: 1B

See also https://github.com/cucumber/cucumber-ruby/issues/969

The implementation of Array#shuffle in Ruby 2.x differs from that used
in JRuby and Ruby 1.9.3. This seed happens to produce the same results
on both.

This is fragile in that it might break in future versions of Ruby. A
better solution would be to change the shuffle implementation to one
that is not implementation-specific.

4522 of 4846 relevant lines covered (93.31%)

341.24 hits per line

Source Files on job 1732.2 (2.1)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1732
  • Travis Job 1732.2
  • 2a6e1e19 on github
  • Prev Job for 2.1 on master (#1731.2)
  • Next Job for 2.1 on master (#1733.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc