fix: Fix for Playwright instrumentation failing from compiled tests - #2932
fix: Fix for Playwright instrumentation failing from compiled tests#2932declancarrollcb wants to merge 1 commit into
Conversation
This is in reference to DataDog#2924
Codecov Report
@@ Coverage Diff @@
## master #2932 +/- ##
=======================================
Coverage 87.59% 87.59%
=======================================
Files 324 324
Lines 11573 11573
Branches 33 33
=======================================
Hits 10137 10137
Misses 1436 1436 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
hey @declancarrollcb ! Thanks for the contribution! I'm still struggling to have a reproducible case: do you only see the error when using Windows? The code looks reasonable but I can't properly evaluate it without testing it. |
|
Hey Juan, It happens both when we are running it on Linux, and when I run it locally on Windows. I've a small repo here where it's reproduced: https://github.com/declancarrollcb/playwright-datadog-trace-issue |
thank you very much! That was really helpful. So I think the issue can be more easily fixed by using the correct test attribute. I was using The fix is in this PR: #2935 Could you test it too? 😄 You can install the branch with: |
|
That looks good to me, I've run it and it's all passing fine. That's also a far cleaner solution than I had 😄 |
|
hey @declancarrollcb thanks for the contribution 😄 . The linked issue should be fixed in #2935. I'm closing this PR :-) |
What does this PR do?
This PR fixes an issue where the Datadog Playwright instrumentation throws an unhandled exception when running compiled Playwright tests from another directory. It updates the test file path handling to ensure that the correct file paths are used during instrumentation.
Motivation
The motivation behind this PR is to resolve the issue mentioned in #2924, allowing users to run compiled Playwright tests from another directory without encountering errors.