Skip to content

Collecting code coverage from functional tests#40512

Merged
dmlemeshko merged 37 commits intoelastic:masterfrom
dmlemeshko:functional-code-coverage
Oct 10, 2019
Merged

Collecting code coverage from functional tests#40512
dmlemeshko merged 37 commits intoelastic:masterfrom
dmlemeshko:functional-code-coverage

Conversation

@dmlemeshko
Copy link
Contributor

@dmlemeshko dmlemeshko commented Jul 8, 2019

Summary

This PR adds the possibility to collect code coverage while running functional tests in Chrome:

export CODE_COVERAGE=1
kbn clean && kbn bootstrap
node scripts/functional_tests.js

Run yarn cover:report to build html report for collected coverage

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@dmlemeshko dmlemeshko added the test-matrix Use this label to ensure PRs are tested with matrix jobs label Sep 30, 2019
@dmlemeshko dmlemeshko force-pushed the functional-code-coverage branch from 875c7a3 to 5e801bf Compare September 30, 2019 08:09
@elasticmachine
Copy link
Contributor

💔 Build Failed

@dmlemeshko dmlemeshko force-pushed the functional-code-coverage branch from 773986e to cca3fb0 Compare September 30, 2019 11:37
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@dmlemeshko dmlemeshko added release_note:skip Skip the PR/issue when compiling release notes and removed test-matrix Use this label to ensure PRs are tested with matrix jobs labels Oct 9, 2019
@dmlemeshko dmlemeshko requested a review from spalger October 9, 2019 18:29
@dmlemeshko dmlemeshko added the test-coverage issues & PRs for improving code test coverage label Oct 9, 2019
@dmlemeshko dmlemeshko changed the title Functional code coverage Collecting code coverage from functional tests Oct 9, 2019
.catch(error => subscriber.error(error));
})
),
);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we wrap it with if(collectCoverage){...} to skip when we don't run tests with coverage?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

.catch(error => subscriber.error(error));
})
),
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to

@dmlemeshko dmlemeshko marked this pull request as ready for review October 9, 2019 20:46
@dmlemeshko dmlemeshko requested a review from a team as a code owner October 9, 2019 20:46
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@dmlemeshko dmlemeshko merged commit 3495f86 into elastic:master Oct 10, 2019
@dmlemeshko dmlemeshko deleted the functional-code-coverage branch March 24, 2020 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes test-coverage issues & PRs for improving code test coverage v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants