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 visibility to flaky jobs #26

Merged
merged 4 commits into from
Aug 31, 2020
Merged

Add visibility to flaky jobs #26

merged 4 commits into from
Aug 31, 2020

Conversation

agis
Copy link
Collaborator

@agis agis commented Aug 28, 2020

These patches provide visibility to test suite flakiness by:

  • printing the flaky jobs in the build summary (via reporter)
  • emitting the flaky jobs to Sentry

A preview of the build summary output:

Failed examples:

  bin/rspec ./test/sample_suites/flaky_job_detection/spec/legit_failure_spec.rb:5 # is expected to equal true

Total results:
  13 examples (6 jobs), 1 failures, 0 errors

Spec execution time: 00:00:00

Flaky jobs detected (count=2):
  ./test/sample_suites/flaky_job_detection/spec/flaky_spec.rb[1:3]
  ./test/sample_suites/flaky_job_detection/spec/flaky_spec.rb[1:1]

And a preview from the Sentry event:

flaky_sentry

Closes #21

@agis agis added the enhancement New feature or request label Aug 28, 2020
@agis agis added this to the 0.2.0 milestone Aug 28, 2020
Copy link

@0xdiba 0xdiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

lib/rspecq/worker.rb Outdated Show resolved Hide resolved
lib/rspecq/reporter.rb Show resolved Hide resolved
@agis agis force-pushed the gh21-flaky-job-visibility branch 2 times, most recently from 4c2cac5 to 4c3e681 Compare August 30, 2020 18:50
This method can be called after a build is complete and returns the jobs
that were flaky (i.e. failed initially but passed upon a retry).

This enables us to provide visibility to flaky tests so that test
implementers have a chance to actually fix them.

Part of #21
Example output (the new part is just below "Spec execution time"):

    Failed examples:

      bin/rspec ./test/sample_suites/flaky_job_detection/spec/legit_failure_spec.rb:5 # is expected to equal true

    Total results:
      13 examples (6 jobs), 1 failures, 0 errors

    Spec execution time: 00:00:00

    Flaky jobs detected (count=2):
      ./test/sample_suites/flaky_job_detection/spec/flaky_spec.rb[1:3]
      ./test/sample_suites/flaky_job_detection/spec/flaky_spec.rb[1:1]

Part of #21
@agis agis force-pushed the gh21-flaky-job-visibility branch from 44d6cb0 to 41b41ba Compare August 31, 2020 08:00
@agis agis merged commit 6e184b2 into master Aug 31, 2020
@agis agis deleted the gh21-flaky-job-visibility branch August 31, 2020 10:19
agis added a commit that referenced this pull request Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide visibility to flaky tests
3 participants