My project is written in TypeScript and uses karma which runs mocha and Istanbul + junit reporters to generate the coverage reports (coverage.json, lcov.info, HTML report) and a junit-style test report (test-results.xml).
We use the SonarTS plugin which works great with the code coverage (lcov.info) but using your plugin sonar scanner fails to read the corresponding junit-style test-results.xml report.
I am not sure exactly regarding the reason - the scan log is not meaningful to me.
Here are some snippets:
<?xml version="1.0"?>
<testsuite name="PhantomJS 2.1.1 (Linux 0.0.0)" package="" timestamp="2016-11-22T13:13:30" id="0" hostname="hostname" tests="75" errors="0" failures="0" time="0.664">
<properties>
<property name="browser.fullName" value="Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1"/>
</properties>
<testcase name="bills components BillItem Should have columns for date, orderId, price & view link" time="0.02" classname="PhantomJS_2_1_1_(Linux_0_0_0).bills"/>
<testcase name="bills components BillList Should have table headers for date, order, price" time="0.009" classname="PhantomJS_2_1_1_(Linux_0_0_0).bills"/>
<testcase name="bills components BillList Should have header table body with BillItems" time="0.002" classname="PhantomJS_2_1_1_(Linux_0_0_0).bills"/>
...
<testcase name="services components Header By default 3 buttons exist" time="0.001" classname="PhantomJS_2_1_1_(Linux_0_0_0).services"/>
<system-out>
<![CDATA[
]]>
</system-out>
<system-err/>
</testsuite>
...
16:01:12.594 INFO: Sensor KarmaJunitReporterJsTestDriverSensor
16:01:12.594 INFO: Parsing Unit Test run results in Surefire format from folder /build/build_reports/test-results
16:01:12.594 DEBUG: test directory prefix is tests/
16:01:12.595 DEBUG: Attempting to determine suite name from "tests/index.js"
16:01:12.595 DEBUG: Removed "tests/" test directory prefix from relativePathKey
16:01:12.595 DEBUG: Found test file: "tests/index.js" with relativePathKey "index.js"
16:01:12.596 DEBUG: Trying to get suite name from "//"
16:01:12.596 DEBUG: Regex could not find suite name: ^(describe\((\'|\")(.*)(\'|\").*$)
16:01:12.596 DEBUG: Trying to get suite name from "// require.context is a special webpack function"
16:01:12.596 DEBUG: Regex could not find suite name: ^(describe\((\'|\")(.*)(\'|\").*$)
16:01:12.596 DEBUG: Trying to get suite name from "// it allows us to dynamically decide which files are considered dependency of this file and therefore will"
16:01:12.596 DEBUG: Regex could not find suite name: ^(describe\((\'|\")(.*)(\'|\").*$)
16:01:12.596 DEBUG: Trying to get suite name from "// be processed by webpack"
16:01:12.597 DEBUG: Regex could not find suite name: ^(describe\((\'|\")(.*)(\'|\").*$)
16:01:12.597 DEBUG: Trying to get suite name from "// In our case, we should search for all app/**/*.spec.ts files"
16:01:12.597 DEBUG: Regex could not find suite name: ^(describe\((\'|\")(.*)(\'|\").*$)
16:01:12.597 DEBUG: Trying to get suite name from "// However since we want to generate a code coverag report we includes all application TS[x] files"
16:01:12.597 DEBUG: Regex could not find suite name: ^(describe\((\'|\")(.*)(\'|\").*$)
16:01:12.597 DEBUG: Trying to get suite name from "// that's way a TS file that was not covered by our tests is still visible inside coverage report"
16:01:12.597 DEBUG: Regex could not find suite name: ^(describe\((\'|\")(.*)(\'|\").*$)
16:01:12.597 DEBUG: Trying to get suite name from "//"
16:01:12.597 DEBUG: Regex could not find suite name: ^(describe\((\'|\")(.*)(\'|\").*$)
16:01:12.597 DEBUG: Trying to get suite name from "const testsContext = require.context('../app', true, /\.ts[x]?$/)"
16:01:12.598 DEBUG: Regex could not find suite name: ^(describe\((\'|\")(.*)(\'|\").*$)
16:01:12.598 DEBUG: Trying to get suite name from "testsContext.keys().forEach(testsContext);"
16:01:12.598 DEBUG: Regex could not find suite name: ^(describe\((\'|\")(.*)(\'|\").*$)
16:01:12.598 WARN: Suite name could not be determined for "tests/index.js"
16:01:12.598 DEBUG: Attempting to determine suite name from "tests/int-polyfil.js"
16:01:12.598 DEBUG: Removed "tests/" test directory prefix from relativePathKey
16:01:12.598 DEBUG: Found test file: "tests/int-polyfil.js" with relativePathKey "int-polyfil.js"
16:01:12.599 DEBUG: Trying to get suite name from "!function(e){function n(r){if(t[r])return t[r].exports;var a=t[r]={exports:{},id:r,loaded:!1};return... -->a very long line which I truncated
...
16:01:12.601 DEBUG: Regex could not find suite name: ^(describe\((\'|\")(.*)(\'|\").*$)
16:01:12.601 WARN: Suite name could not be determined for "tests/int-polyfil.js"
16:01:12.712 WARN: Test result will not be saved for test class "PhantomJS_2_1_1_(Linux_0_0_0).bills", because SonarQube associated resource has not been found in suite-to-file map using key "bills".
16:01:12.712 WARN: Test result will not be saved for test class "PhantomJS_2_1_1_(Linux_0_0_0).services", because SonarQube associated resource has not been found in suite-to-file map using key "services".
16:01:12.712 WARN: Test result will not be saved for test class "PhantomJS_2_1_1_(Linux_0_0_0).(Component) AppButton", because SonarQube associated resource has not been found in suite-to-file map using key "(Component) AppButton".
16:01:12.712 WARN: Test result will not be saved for test class "PhantomJS_2_1_1_(Linux_0_0_0).login", because SonarQube associated resource has not been found in suite-to-file map using key "login".
16:01:12.712 WARN: Test result will not be saved for test class "PhantomJS_2_1_1_(Linux_0_0_0).(Component) InputGroup", because SonarQube associated resource has not been found in suite-to-file map using key "(Component) InputGroup".
16:01:12.712 WARN: Test result will not be saved for test class "PhantomJS_2_1_1_(Linux_0_0_0).(Component) Header", because SonarQube associated resource has not been found in suite-to-file map using key "(Component) Header".
16:01:12.712 INFO: Sensor KarmaJunitReporterJsTestDriverSensor (done) | time=118ms
...
Any help would be appreciated.
Thanks,
Mor