Search code examples
xmlcode-coveragestandardscobertura

Is the Cobertura report format standardized?


At work we use GitLab which reads Cobertura output. We are creating tooling around it (to produce and ingest these formats). Is there a standard for Cobertura's XML report? Are there officials examples of this spec for the purpose of testing a parser? Without assuming a specific implementation is doing it right?


Solution

  • I can't find an actual specification but numerous things point to coverage-04.dtd being the implementation including grcov, and coveragepy. A XML DTD is effectively an unversioned specification for XML schema in code. Being that it's on the official repository, that seems pretty official.

    However, there are some real questions regarding this, namely that there are conflicting versions of this within the same project. I've opened up a GitHub issue (#425) on this asking for clarification.