fix(test-optimization): support cucumber 13.1 results#9370
Conversation
Overall package sizeSelf size: 6.77 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.1 | 122.62 kB | 438.86 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
🎉 All green!🧪 All tests passed 🔄 Datadog retried 1 test - 1 passed on retry 🎯 Code Coverage (details) 🔗 Commit SHA: 781b5d5 | Docs | Datadog PR Page | Give us feedback! |
|
Bits Code status: ✅ Done Comment @DataDog to request changes |
There was a problem hiding this comment.
More details
The PR correctly fixes a critical bug where Cucumber 13.1's new result format { success, exception? } was being treated as a boolean, causing failed tests to be reported as passing. The fix conditionally extracts the success field for Cucumber 13.1+ while maintaining backward compatibility with Cucumber 13.0. Comprehensive validation confirms the fix handles both versions correctly without regressions.
📊 Validated against 5 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 781b5d5 · What is Autotest? · Any feedback? Reach out in #autotest
BenchmarksBenchmark execution time: 2026-07-15 09:13:56 Comparing candidate commit 781b5d5 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2318 metrics, 40 unstable metrics.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9370 +/- ##
==========================================
+ Coverage 96.57% 96.65% +0.08%
==========================================
Files 918 923 +5
Lines 121577 122845 +1268
Branches 21074 21456 +382
==========================================
+ Hits 117407 118730 +1323
+ Misses 4170 4115 -55 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What does this PR do?
Updates the Cucumber instrumentation for the runtime result introduced in Cucumber 13.1.0. The wrapper now reads the
successfield for 13.1+ while returning Cucumber's original result object unchanged.Also bumps the pinned
@cucumber/cucumbertest dependency from 13.0.0 to 13.1.0.Motivation
Cucumber 13.1 changed
Coordinator.run()from returning a boolean to returning{ success, exception? }. The instrumentation treated that object as a boolean, so failed test sessions were reported as passing.This fixes the failures from the latest-version compatibility job.
Additional Notes
Validation:
git diff --checkpass.