-
Notifications
You must be signed in to change notification settings - Fork 309
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
[ci-visibility] Support parallel mode in cucumber #4260
[ci-visibility] Support parallel mode in cucumber #4260
Conversation
BenchmarksBenchmark execution time: 2024-04-29 13:28:16 Comparing candidate commit 64f71f3 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 258 metrics, 8 unstable metrics. |
Overall package sizeSelf size: 6.44 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4260 +/- ##
==========================================
- Coverage 83.11% 80.42% -2.69%
==========================================
Files 244 3 -241
Lines 10255 373 -9882
Branches 33 33
==========================================
- Hits 8523 300 -8223
+ Misses 1732 73 -1659 ☔ View full report in Codecov by Sentry. |
b89eaac
to
a1b9251
Compare
@@ -123,112 +97,134 @@ versions.forEach(version => { | |||
isAgentless = reportMethod === 'agentless' | |||
envVars = isAgentless ? getCiVisAgentlessConfig(receiver.port) : getCiVisEvpProxyConfig(receiver.port) | |||
}) | |||
it('can run and report tests', (done) => { |
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.
The changes in this file are just for running this test both in serial and parallel mode
} | ||
return acc | ||
}, {}) | ||
} |
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.
ℹ️ getFilteredPickles
and getPickleByFile
were hoisted but no other changes
name: '@cucumber/cucumber', | ||
versions: ['>=7.3.0'], | ||
file: 'lib/runtime/test_case_runner.js' | ||
}, testCaseHook) |
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.
ℹ️ these two hooks were just moved
} | ||
|
||
return runTestCaseResult | ||
} | ||
} | ||
|
||
// From 7.3.0 onwards, runPickle becomes runTestCase | ||
function getWrappedParseWorkerMessage (parseWorkerMessageFunction) { |
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.
ℹ️ getWrappedParseWorkerMessage
is for intercepting messages from the workers and:
- flush test data coming from the workers (workers now use the interprocess exporter)
- start / finish test suites
// `getWrappedStart` generates session start and finish events | ||
// `getWrappedGiveWork` generates suite start events and sets pickleResultByFile (used by suite finish events) | ||
// `getWrappedParseWorkerMessage` generates suite finish events | ||
addHook({ |
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.
ℹ️ only new hook for parallel mode
return super.startTestSpan( | ||
testName, | ||
testSuite, | ||
this.testSuiteSpan, |
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.
ℹ️ now there can be multiple test suite spans active at the same time, that's why we can use this.testSuiteSpan
@@ -0,0 +1,56 @@ | |||
'use strict' |
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.
ℹ️ rename from jest-worker
with some small changes for accommodating cucumber
@@ -0,0 +1,83 @@ | |||
'use strict' |
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.
ℹ️ renamed from jest-worker
and added tests for cucumber
What does this PR do?
jest-worker
exporter totest-worker
.test-worker
exporter for cucumber as well.ℹ️ Multiple tests failing because of node22 release. Being fixed in #4267
Motivation
Allow users to use parallel mode with cucumber: https://github.com/cucumber/cucumber-js/blob/main/docs/parallel.md. It used to be incompatible with dd-trace.
Plugin Checklist