[ci-visibility] Extract code coverage from cypress#3159
Conversation
Overall package sizeSelf size: 4.16 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov Report
@@ Coverage Diff @@
## master #3159 +/- ##
==========================================
- Coverage 86.95% 86.64% -0.31%
==========================================
Files 322 328 +6
Lines 11763 11866 +103
Branches 33 33
==========================================
+ Hits 10228 10281 +53
- Misses 1535 1585 +50
... and 30 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
155908b to
566fa65
Compare
|
I'm moving this back to draft because I found an important bug |
567cc36 to
eaac6b5
Compare
| traceId: this.testSuiteSpan.context()._traceId, | ||
| spanId: this.testSuiteSpan.context()._spanId, | ||
| sessionId: this.testSuiteSpan.context()._traceId, | ||
| suiteId: this.testSuiteSpan.context()._spanId, |
There was a problem hiding this comment.
unrelated fix: these names make more sense, given that that's what we end up encoding
ok that should be fixed |
| const coverageFiles = getCoveredFilenamesFromCoverage(coverage) | ||
| const relativeCoverageFiles = coverageFiles.map(file => getTestSuitePath(file, rootDir)) | ||
| const formattedCoverage = { | ||
| sessionId: testSuiteSpan.context()._traceId, |
There was a problem hiding this comment.
no need to call .context() twice no ?
There was a problem hiding this comment.
everytime i use both spanId and traceId i usually "cache" the span context
There was a problem hiding this comment.
true. Will change that
Co-authored-by: Ugaitz Urien <[email protected]>
Co-authored-by: Ugaitz Urien <[email protected]>
Co-authored-by: Ugaitz Urien <[email protected]>
Co-authored-by: Ugaitz Urien <[email protected]>
Co-authored-by: Ugaitz Urien <[email protected]>
Co-authored-by: Ugaitz Urien <[email protected]>
Co-authored-by: Ugaitz Urien <[email protected]>
Co-authored-by: Ugaitz Urien <[email protected]>
What does this PR do?
If
window.__coverage__available from the test's context, it means that the web app has been instrumented with code coverage. If that's the case, we extract it.Motivation
First step to making ITR usable with cypress.