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

[SDTEST-477] add command line tool to compute a percentage of skippable tests for RSpec #194

Merged
merged 4 commits into from
Oct 17, 2024

Conversation

anmarchenko
Copy link
Member

@anmarchenko anmarchenko commented Jun 20, 2024

What does this PR do?
Adds a command line interface ddcirb that outputs percentage of skipped tests for the current test run.

Documentation on the usage is provided within PR in CommandLineInterface.md file.

Motivation
This tool is useful to determine a number of parallel jobs when running big rspec test suites.

How to test the change?
Tested using https://github.com/anmarchenko/forem project.

@codecov-commenter
Copy link

codecov-commenter commented Jun 21, 2024

Codecov Report

Attention: Patch coverage is 93.54839% with 4 lines in your changes missing coverage. Please review.

Project coverage is 98.85%. Comparing base (bbc6b66) to head (885e90e).

Files with missing lines Patch % Lines
lib/datadog/ci/test_optimisation/component.rb 72.72% 3 Missing ⚠️
lib/datadog/ci/test_visibility/null_transport.rb 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #194      +/-   ##
==========================================
- Coverage   98.86%   98.85%   -0.02%     
==========================================
  Files         279      280       +1     
  Lines       13603    13647      +44     
  Branches      637      641       +4     
==========================================
+ Hits        13449    13491      +42     
- Misses        154      156       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

lib/tasks/rspec.rake Outdated Show resolved Hide resolved
lib/tasks/rspec.rake Outdated Show resolved Hide resolved
lib/tasks/rspec.rake Outdated Show resolved Hide resolved
lib/tasks/rspec.rake Outdated Show resolved Hide resolved
lib/tasks/rspec.rake Outdated Show resolved Hide resolved
@anmarchenko anmarchenko force-pushed the anmarchenko/rake_skippable_tests_percentage branch from 6b21d41 to c050ca4 Compare July 22, 2024 05:23
@anmarchenko anmarchenko force-pushed the anmarchenko/rake_skippable_tests_percentage branch from d411a96 to 4d8a92a Compare August 28, 2024 11:28
@anmarchenko anmarchenko force-pushed the anmarchenko/rake_skippable_tests_percentage branch 2 times, most recently from 68a1dc3 to 9bbc5ec Compare October 8, 2024 13:00
@anmarchenko anmarchenko changed the title add rake task to compute a percentage of skippable tests for RSpec [SDTEST-477] add rake task to compute a percentage of skippable tests for RSpec Oct 8, 2024
@anmarchenko anmarchenko changed the title [SDTEST-477] add rake task to compute a percentage of skippable tests for RSpec [SDTEST-477] add command line tool to compute a percentage of skippable tests for RSpec Oct 11, 2024
@anmarchenko anmarchenko force-pushed the anmarchenko/rake_skippable_tests_percentage branch from 2636bc7 to a4872e7 Compare October 16, 2024 10:17
@anmarchenko anmarchenko marked this pull request as ready for review October 16, 2024 10:21
@anmarchenko anmarchenko requested review from a team as code owners October 16, 2024 10:21
Example usage:

```bash
$ RAILS_ENV=test bundle exec ddcirb skipped-tests
Copy link
Contributor

Choose a reason for hiding this comment

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

should we show an example of the output? Or is that somewhere else?

Copy link
Member Author

Choose a reason for hiding this comment

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

the output just one line below

Copy link
Member Author

Choose a reason for hiding this comment

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

0.45 is the output

@anmarchenko anmarchenko merged commit 1d81d80 into main Oct 17, 2024
31 checks passed
@anmarchenko anmarchenko deleted the anmarchenko/rake_skippable_tests_percentage branch October 17, 2024 07:43
@github-actions github-actions bot added this to the 1.8.0 milestone Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants