Skip to content

Ensure test coverage is merged across all 3 projects #1779

@sydseter

Description

@sydseter

We are only getting test coverage for the converter even though we upload coverage for all the code. We probably need to look at how the paths in the coverage reports are generated.

The coverage is generated in 3 places:

website:

files: cornucopia.owasp.org/coverage/lcov.info

Copi:

files: copi.owasp.org/cover/cobertura.xml

Converter:

files: coverage.xml

Besides generating different reporting formats, they are also executed from different folders. Hopefully, the fix is to execute the coverage generation from the base of the repository and uploading each separately, if not, we may need to either see if it’s possible to rewrite the reports into one somehow or see if qlty have support for having multiple projects in one repo.

note the o self, or anyone willing:

A way forward could be to switch to using istanbul for generating code reports for the website. We are currently using lcov: (ref:

reporter: ['text', 'json', 'lcov'],
)

but switching should be as simple as changing:

        reporter: ['text', 'json', 'lcov'],

to:

      reporter: ['cobertura'],

It has been reported to be buggy: vitest-dev/vitest#8116

So If that doesn’t work we can always switch to using nyc https://docs.gitlab.com/ci/testing/code_coverage/cobertura/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions