简体   繁体   English

Visual Studio Team Services / SonarQube:将.trx / .coverage文件转换为LCOV吗?

[英]Visual Studio Team Services / SonarQube: Converting a .trx/.coverage file to a LCOV?

I'm trying to convert the .coverage or the .trx file generated from running a Test Assemblies task in Team Services (was VSO) build manager into a LCOV file that's parseable by SonarQube so that javascript coverage results are reported. 我正在尝试将通过在Team Services(曾经是VSO)构建管理器中运行“测试组装”任务而生成的.coverage或.trx文件转换为SonarQube可以解析的LCOV文件,以便报告javascript覆盖率结果。

Is there any preset/recommended way to do this? 是否有任何预设/推荐的方式来做到这一点? I figure I could just use a powershell script to call Chutzpah (as it's included as a nuget package) and convert the .trx to an LCOV. 我想我可以使用Powershell脚本调用Chutzpah(因为它是作为nuget包提供的)并将.trx转换为LCOV。

Chutzpah is an open source JavaScript test runner which enables you to run unit tests using QUnit, Jasmine, Mocha, CoffeeScript and TypeScript. Chutzpah是一个开放源代码的JavaScript测试运行程序,使您可以使用QUnit,Jasmine,Mocha,CoffeeScript和TypeScript运行单元测试。

You can use the transforms setting to specify which output transformers should run after testing is finished. 您可以使用transforms设置来指定测试完成后应运行哪些输出变压器。 Output test coverage data as LCOV file to C:\\temp\\lcov.dat: 将测试覆盖率数据作为LCOV文件输出到C:\\ temp \\ lcov.dat:

{
    "Transforms": [
        { "Name": "lcov", "Path": "lcov.dat" }
    ]
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM