Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FailureListFormatter that logs parsable failures #3

Merged
merged 1 commit into from
May 24, 2019

Conversation

RohanM
Copy link
Contributor

@RohanM RohanM commented May 24, 2019

We'd like to keep track of intermittently failing specs, and to do that we'd like a parsable list of failing specs. Later versions of rspec contain FailureListFormatter that can do this, so port in a copy and add it as a default formatter, outputting to log/rspec-failures.log.

@nickbrowne
Copy link
Contributor

After rebasing on master, looks like it does the trick 👍

$ bundle exec rspec-queue spec
..
  1) RSpecQueue::Configuration#worker_count RSPEC_QUEUE_WORKERS env var set fails
     Failure/Error: expect(true).to eq false
     
       expected: false
            got: true
     
       (compared using ==)
     # ./spec/rspec_queue/configuration_spec.rb:25:in `block (4 levels) in <top (required)>'
     # ./lib/rspec_queue/worker_runner.rb:22:in `run_specs'

Finished in 0.31236 seconds
(files took 0.10015 seconds to load)
2 examples, 1 failure
Top 5 slowest examples:
./spec/rspec_queue/configuration_spec.rb:12 took 0.01s, impact on build time is 0.0s (0.6%)
./spec/rspec_queue/configuration_spec.rb:20 took 0.0s, impact on build time is 0.0s (0.0%)

$ cat log/rspec-failures.log 
./spec/rspec_queue/configuration_spec.rb:24:fails

@nickbrowne nickbrowne force-pushed the output-failures-to-file branch from 0830e43 to 6c5c374 Compare May 24, 2019 04:31
@nickbrowne nickbrowne merged commit f229905 into master May 24, 2019
@nickbrowne nickbrowne deleted the output-failures-to-file branch May 24, 2019 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants