[CIVIS-7950] Add rspec instrumentation for test suite level visibility #86
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:
