You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

SonarCloud获取单元测试总数的API端点咨询

获取SonarCloud单元测试总数的API端点
  • 要获取截图中标注的单元测试总数,使用api/measures/component接口即可,核心是指定metricKeys=tests参数。
  • 核心请求示例:
    GET api/measures/component?component=<你的项目Key>&metricKeys=tests
    
  • 返回结果里的measures数组中,对应metric="tests"的value字段就是单元测试总数。
  • 额外说明:如果需要同时获取其他测试相关指标,可通过逗号分隔多个metricKey,比如metricKeys=tests,test_failures,test_success_density

内容的提问来源于stack exchange,提问作者Noob

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.13 03:32:02