测试msr未在SonarQube API中显示

时间:2016-12-12 17:06:49

标签: sonarqube

我为所有存储库设置了SonarQube。在大多数这些工作 - 覆盖,测试,线路覆盖等显示在api调用中。对于一些(可能是1/4),测试msr没有显示。见下面的例子。

一个有趣的注意事项:在测试msr未显示的情况下,仍然可以正确计算覆盖率。

我有没有设置好的东西?这是Sonar或Jacoco的问题吗?

这两个例子都是我的uri:

http://buildbox:9000/api/resources?metrics=lines_to_cover,uncovered_lines,coverage,tests

好:

{
  "id": 62,
  "key": "com.blah.source",
  "name": "source",
  "scope": "PRJ",
  "qualifier": "TRK",
  "date": "2016-12-09T14:18:43-0700",
  "creationDate": "2014-11-19T14:54:59-0700",
  "lname": "source",
  "version": "3.2.4.0",
  "description": "The main module for the Blah Site.",
  "msr": [
    {
      "key": "tests",
      "val": 707,
      "frmt_val": "707"
    },
    {
      "key": "coverage",
      "val": 2.8,
      "frmt_val": "2.8%"
    },
    {
      "key": "lines_to_cover",
      "val": 256213,
      "frmt_val": "256,213"
    },
    {
      "key": "uncovered_lines",
      "val": 248879,
      "frmt_val": "248,879"
    }
  ]
}

为:

{
  "id": 27115,
  "key": "com.blah.client:client",
  "name": "client",
  "scope": "PRJ",
  "qualifier": "TRK",
  "date": "2016-10-05T15:17:27-0600",
  "creationDate": "2015-08-14T15:01:36-0600",
  "lname": "best-match-client",
  "version": "1.0.47",
  "description": "Base POM: contains testing dependencies, testing profile, and simple build",
  "msr": [
    {
      "key": "coverage",
      "val": 97.7,
      "frmt_val": "97.7%"
    },
    {
      "key": "lines_to_cover",
      "val": 418,
      "frmt_val": "418"
    },
    {
      "key": "uncovered_lines",
      "val": 7,
      "frmt_val": "7"
    }
  ]
}

谢谢!

0 个答案:

没有答案