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-1229] Skip before(:all) context hooks when all examples are skipped #262

Merged
merged 10 commits into from
Dec 4, 2024

Conversation

anmarchenko
Copy link
Member

@anmarchenko anmarchenko commented Dec 3, 2024

What does this PR do?
Closes #256

Improves handling of RSpec context hooks when tests are skipped by test impact analysis: now we will skip context hooks if we know that all examples in the context are going to be skipped by Datadog.

Motivation
See #256

Additional Notes
This PR doesn't address another limitation of context hooks with test impact analysis: when we collect impacted files for test (aka per test code coverage), we don't cover context hooks (because they cannot be attributed to any single test). This can lead to skipping tests that should not be skipped. I reprioritised the issue with context hooks coverage higher because there is new evidence that context hooks are being used by our customers.

How to test the change?
Unit tests are provided

@anmarchenko anmarchenko force-pushed the anmarchenko/rspec_skip_example_group branch from a5a8d1c to 6df2a5a Compare December 3, 2024 12:52
@anmarchenko anmarchenko marked this pull request as ready for review December 4, 2024 12:36
@anmarchenko anmarchenko requested review from a team as code owners December 4, 2024 12:36
@anmarchenko anmarchenko merged commit 05511ec into main Dec 4, 2024
185 checks passed
@anmarchenko anmarchenko deleted the anmarchenko/rspec_skip_example_group branch December 4, 2024 13:58
@github-actions github-actions bot added this to the 1.10.0 milestone Dec 4, 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.

Datadog ITR doesn't play well with context hooks
3 participants