-
Notifications
You must be signed in to change notification settings - Fork 6
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
[CIVIS-7950] Add rspec instrumentation for test suite level visibility #86
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #86 +/- ##
==========================================
- Coverage 99.13% 99.10% -0.03%
==========================================
Files 135 137 +2
Lines 5226 5391 +165
Branches 189 207 +18
==========================================
+ Hits 5181 5343 +162
- Misses 45 48 +3 ☔ View full report in Codecov by Sentry. |
3e02daa
to
4fc8c38
Compare
…::ExampleGroup instead of using alias_method
…ec_helper is required Runner#run is already being executed
…pport shared example groups
juan-fernandez
approved these changes
Dec 12, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds RSpec instrumentation for test suite level visibility
Additional Notes
This change is mostly compatible with current rspec instrumentation except one important change:
test suite name for a test is now
metadata[:example_group][:rerun_file_path]
instead ofmetadata[:example_group][:file_path]
. The reason for that is if ExampleGroup is defined in shared examples inside a context like that:...then
file_path
contains the path of shared examples file whereasrerun_file_path
contains the path of test file.How to test the change?
There are open source projects I used for testing:
https://github.com/anmarchenko/middleman
https://github.com/anmarchenko/rubocop
https://github.com/anmarchenko/vagrant
Example of sesison trace for middleman specs:
![image](https://private-user-images.githubusercontent.com/426400/289891522-e8c54b11-996f-491f-8ced-4551d435e223.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NTI5NzcsIm5iZiI6MTczODk1MjY3NywicGF0aCI6Ii80MjY0MDAvMjg5ODkxNTIyLWU4YzU0YjExLTk5NmYtNDkxZi04Y2VkLTQ1NTFkNDM1ZTIyMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QxODI0MzdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00MzQ0ZDEwZDM2MzY1YzUyZjMwNDZlM2Q5NGZiODYwZGM2MjgwYWY5MjYyYzhlMmMyNTA5ZTE5YmE4YWU4OTVjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.-ugyEutlHoTKP41rx9Ej5Of6qruZqFwAC92yFK4k0CA)