ampproject / ampproject/amphtml
Accurately measure code coverage during integration tests
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
Today, the code coverage measured by the integration tests is ~31%.

This is inaccurate because we're not instrumenting the built runtime used in `commonIntegrationTestPaths`.
https://github.com/ampproject/amphtml/blob/aafa1512f2feb9b1528da1b3d8b380a8ad5eb8ae/build-system/config.js#L36-L62
Adding `istanbul` instrumentation via `browserify` to `gulp build` slows down the build by an order of magnitude and doesn't change the coverage measured (https://github.com/ampproject/amphtml/pull/22567#issuecomment-497122667). Not sure what else can be done, or if it's even feasible to measure code coverage for built JS files that are loaded by webpages during tests.
/cc @ampproject/wg-infra @aghassemi
Contributor guide
Assessment
This issue has not been assessed yet.