Teamcity + NYC + Istanbul - generate test coverage report

不羁岁月 提交于 2019-12-08 05:46:10

问题


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.


回答1:


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..."
  ...
}

Then, in your build step, simply invoke it via command line npm run coverage:teamcity

Teamcity will automatically parse the output and generate the coverage summary for you.



来源:https://stackoverflow.com/questions/43047752/teamcity-nyc-istanbul-generate-test-coverage-report

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!