Skip to content
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

Accurately measure code coverage during integration tests #22682

Open
rsimha opened this issue Jun 4, 2019 · 3 comments
Open

Accurately measure code coverage during integration tests #22682

rsimha opened this issue Jun 4, 2019 · 3 comments
Assignees
Labels
P2: Soon Stale Inactive for one year or more Type: Bug WG: infra

Comments

@rsimha
Copy link
Contributor

rsimha commented Jun 4, 2019

Today, the code coverage measured by the integration tests is ~31%.

Screenshot from 2019-06-04 14-03-07

This is inaccurate because we're not instrumenting the built runtime used in commonIntegrationTestPaths.

const builtRuntimePaths = [
{
pattern: 'dist/**/*.js',
included: false,
nocache: false,
watched: true,
},
{
pattern: 'dist.3p/**/*',
included: false,
nocache: false,
watched: true,
},
{
pattern: 'dist.tools/**/*.js',
included: false,
nocache: false,
watched: true,
},
];
const commonUnitTestPaths = initTestsPath.concat(fixturesExamplesPaths);
const commonIntegrationTestPaths = initTestsPath.concat(
fixturesExamplesPaths,
builtRuntimePaths
);

Adding istanbul instrumentation via browserify to gulp build slows down the build by an order of magnitude and doesn't change the coverage measured (#22567 (comment)). 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

@rsimha
Copy link
Contributor Author

rsimha commented Apr 30, 2020

This has come up during recent conversations about improving release quality and enforcing a minimum code coverage bar. Bumping this to P2.

@rsimha rsimha removed their assignment Apr 22, 2021
@rsimha
Copy link
Contributor Author

rsimha commented Apr 22, 2021

[Infra triage] Some progress has been made towards accurately measuring coverage during integration / e2e tests since this issue was filed. See #30463, #30129, #31787 (abandoned). Putting this on the radar of @rileyajones in case there is other low-hanging fruit that will allow us to get coverage numbers during CI.

@stale
Copy link

stale bot commented Sep 17, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale Inactive for one year or more label Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2: Soon Stale Inactive for one year or more Type: Bug WG: infra
Projects
No open projects
Infrastructure
  
FixIt week
Development

No branches or pull requests

2 participants