-
Notifications
You must be signed in to change notification settings - Fork 369
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
On RSpec integration, change suite name to example group file path (i.e. "fix" shared_examples suite names) #1816
On RSpec integration, change suite name to example group file path (i.e. "fix" shared_examples suite names) #1816
Conversation
b51eb1d
to
04ffb01
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed problem description! It really helped me understand the issue.
Overall the change makes sense to me; test is pretty straightforward. Should be fine.
Just as a heads up, it might be a bit till this rolls out, as we're trying to finalize a 1.0 release. We'll see how this fits in given the current schedule.
Thanks for the contribution!
Hey @delner Any updates on the merging status of this PR? 馃槃 |
@Drowze Yes, I think we can merge this if all is well. Can you rebase this on the latest |
In Datadog we report all tests' suite names as the example file path, which usually is the same as the example group file path. This is not always true however, especifically on the case of tests included from a different path (usually on a shared_examples block). Because of that, suite name would be reported as the shared examples file path, which was not not very helpful to track the files that are taking the most to run as the shared examples can be on a different path than the test file that included them. To address this, the this commit adds the use of `metadata[:example_group][:file_path]`, so all test suites should be reported as the _example group file path_.
04ffb01
to
fca42c7
Compare
Sorry for the delay @delner Just rebased. Hope it's not too late 馃槃 |
Codecov Report
@@ Coverage Diff @@
## master #1816 +/- ##
=======================================
Coverage 97.69% 97.69%
=======================================
Files 1000 1001 +1
Lines 50445 50453 +8
=======================================
+ Hits 49283 49292 +9
+ Misses 1162 1161 -1
馃摚 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
This was released in 1.0.0.beta2. |
Hello DataDog crew 馃憢
As my first PR here, please let me know if there's anything weird on the PR (diffs or description) 馃槃
The problem
In Datadog we report all tests' suite names as the example file path, which usually is the same as the example group file path. This is not always true however, specifically for the case of tests included from a different path (usually on a shared_examples block).
Because of that, suite name would be reported as the shared examples file path, which was not not very helpful to track the files that are taking the most to run as the shared examples can be on a different path than the test file that included them.
For example, we have some test examples on a "vehicle_controller_example.rb" file that are included a few times on some other controller and, instead of that controller appearing as slow suite on DataDog, we have the shared example file as such, see:
The solution
To address this, I'm adding the use of
metadata[:example_group][:file_path]
instead of simplyfile_path
, so all test suites should be reported as the example group file path (meaning that, instead of the shared examples path, I'd see the controller path on the screenshot above).