Import jasmine-node test reports

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Community Edition, version 7.7
  • what are you trying to achieve
    We are using jasmin-node for unit testing. Using the command
    jasmine-node apiproxy/resources/spec --junitreport --output apiname
    We want to import these reports in sonarqube.
  • what have you tried so far to achieve this
    I tried to browse internet to get help on how to convert them in generic data format sonarqube supports but haven’t got any success till now.
    Thanks

Hello @Bala_Joshi,

As mentioned in our doc, for JS/TS, only karma-sonarqube-unit-reporter and jest-sonar-reporter can be used to export to our Generic format. Is that possible for you to use Jest or Karma to run your tests?

Otherwise, I’m afraid you will have to implement this export format by yourself. Though based on what they did for Karma and Jest, it should not be a big effort.

Cheers

Thanks Antoine

We have to use jasmine for unit testing. We will try to convert the reports into generic format.

Hello @Antoine

I have created a python script that is generating a report file in generic data format. Now I am able to see unittests on UI but not able find the failure messages in the report file.

Thanks

Hi @Bala_Joshi ,

Can you please share the python script. That will help for us as well.

Thanks!