How to consume Code Coverage on JUnit Format for nodejs (Typescript apps)

Howdy! I’m using Sonar 9.2.

Wondering if there are recommended ways to use Junit XML format test coverage from Typescript (nodejs) apps.

Why? I already have a project using that type of reporter for other platforms and would be great to reuse the same output for Sonar.

1 Like

Hello Ivan,

Thank you for reaching out.

Every analyser has their own coverage report format(s) (see Test Coverage & Execution). In the particular case of JavaScript and TypeScript, the corresponding analyser expects the lcov format.

Having said that, SonarQube also supports a generic test data format. If you really want to use the JUnit format for your code coverage, you’ll need to write a small tool that converts it into SonarQube’s generic one.

Hope this helps,

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.