Teamcity + NYC + Istanbul-生成测试覆盖率报告 [英] Teamcity + NYC + Istanbul - generate test coverage report
问题描述
每次构建时,我都试图将测试报告生成为teamcity.我研究了几种方法,最终找到了伊斯坦布尔的teamcity记者:
I am trying to generate tests report into teamcity, everytime built is made. I've researched the several methods and ended up finding Istanbul's teamcity reporter: teamcity
现在,我正在尝试将其整合到团队合作中,但是我没有找到有关它的任何说明.
Now I am trying to integrate it into teamcity, but I've not found any instructions about it.
推荐答案
您需要做的就是在package.json
中添加一个使用报告程序的script
目标:
All you need to do is add a script
target in your package.json
that uses the reporter:
"script": {
...
"coverage:teamcity": "nyc --reporter=teamcity mocha ...etc..."
...
}
然后,在构建步骤中,只需通过命令行npm run coverage:teamcity
Then, in your build step, simply invoke it via command line npm run coverage:teamcity
Teamcity将自动解析输出并为您生成覆盖率摘要.
Teamcity will automatically parse the output and generate the coverage summary for you.
这篇关于Teamcity + NYC + Istanbul-生成测试覆盖率报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!