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

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

Build:
Build:
LAST BUILD BRANCH: master
DEFAULT BRANCH: main
Ran 19 Apr 2016 11:38PM UTC
Jobs 5
Files 117
Run time 14min
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

pending completion
1732

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.

5970 of 6445 relevant lines covered (92.63%)

1302.34 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1732.1 (2.2) 19 Apr 2016 11:38PM UTC 0
93.31
Travis Job 1732.1
2 1732.2 (2.1) 19 Apr 2016 11:41PM UTC 0
93.31
Travis Job 1732.2
3 1732.3 (2.0) 19 Apr 2016 11:42PM UTC 0
93.29
Travis Job 1732.3
4 1732.4 (1.9.3) 19 Apr 2016 11:45PM UTC 0
93.33
Travis Job 1732.4
5 1732.5 (jruby-1.7.12) 19 Apr 2016 11:52PM UTC 0
90.82
Travis Job 1732.5
Source Files on build 1732
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1732
  • 2a6e1e19 on github
  • Prev Build on master (#1731)
  • Next Build on master (#1733)
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