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

Missing coverage information in generic format #1666

Closed
chrisberkhout opened this issue Feb 8, 2024 · 0 comments · Fixed by #1671
Closed

Missing coverage information in generic format #1666

chrisberkhout opened this issue Feb 8, 2024 · 0 comments · Fixed by #1671
Assignees
Labels
bug Something isn't working

Comments

@chrisberkhout
Copy link
Contributor

chrisberkhout commented Feb 8, 2024

The problem

Using --coverage-format=generic produces an XML report that is missing the coverage that is expected, and that is correctly reported when using --coverage-format=cobertura.

An example

This command:

elastic-package test pipeline -v --test-coverage --coverage-format=cobertura

when run for example on elastic/integrations#9077, will produce expected coverage numbers, like this:

| Filename                                                                         |   Stmts |   Miss |
|----------------------------------------------------------------------------------|---------|--------|
| packages/zoom/data_stream/webhook/elasticsearch/ingest_pipeline/account.yml      |      95 |     25 |
| packages/zoom/data_stream/webhook/elasticsearch/ingest_pipeline/chat_channel.yml |      53 |      7 |
| packages/zoom/data_stream/webhook/elasticsearch/ingest_pipeline/chat_message.yml |      48 |     15 |
| packages/zoom/data_stream/webhook/elasticsearch/ingest_pipeline/default.yml      |     102 |      0 |
| packages/zoom/data_stream/webhook/elasticsearch/ingest_pipeline/meeting.yml      |     152 |     16 |
| packages/zoom/data_stream/webhook/elasticsearch/ingest_pipeline/phone.yml        |     155 |      9 |
| packages/zoom/data_stream/webhook/elasticsearch/ingest_pipeline/recording.yml    |     105 |     10 |
| packages/zoom/data_stream/webhook/elasticsearch/ingest_pipeline/user.yml         |     162 |     19 |
| packages/zoom/data_stream/webhook/elasticsearch/ingest_pipeline/webinar.yml      |     118 |      0 |
| packages/zoom/data_stream/webhook/elasticsearch/ingest_pipeline/zoomroom.yml     |      16 |      4 |
| TOTAL                                                                            |    1006 |    105 |

But when the generic format is used as follows:

elastic-package test pipeline -v --test-coverage --coverage-format=generic

The report will only show coverage for default.yml and account.yml. That's causing SonarQube Quality Gate failures.

Related issues

@chrisberkhout chrisberkhout added the bug Something isn't working label Feb 8, 2024
@mrodm mrodm self-assigned this Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants