Shota
Shota

Reputation: 7330

Teamcity + NYC + Istanbul - generate test coverage report

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.

Upvotes: 1

Views: 1282

Answers (1)

Stefan Z Camilleri
Stefan Z Camilleri

Reputation: 4076

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.

Upvotes: 5

Related Questions