1

In the official page I can see this: http://www.jetbrains.com/teamcity/img/screenshots/1-continuous-integration.png. Look at "IntegrationBuild". The build titles are not "Success" as usual, but "Test passed: XXXX". Also, look at this: https://confluence.jetbrains.com/download/attachments/74847116/failedTests.png?version=1&modificationDate=1375387904000&api=v2. There is a Tests tab.

  • How I can enable the "Test passed" report? Also, how I can collect the TotalTestCount statistic? (I need this for the statistics tab.)
  • I also found the Tests tab on some screenshots. How I can generate data for this tab?

Of course, I run unit tests too. I have Karma as a test runner and Jasmine as a test framework. I use the standard Karma coverage reporter, so I can see percent coverage for the whole project and for specified files too, but I have the standard "Success" message. Where I can I find info about it?

Dave Schweisguth
  • 36,475
  • 10
  • 98
  • 121
Sharikov Vladislav
  • 7,049
  • 9
  • 50
  • 87

1 Answers1

1

I know of two ways to get test results into TeamCity. The first is that some runner types (the first thing you select to tell a build step what to do) have test reporting built in. I believe you need to use the Command Line runner to run Karma; that doesn't have test reporting built in. So I don't think that you can get Karma results into TeamCity through a runner.

The other way is the XML Report Processing build feature. (Build features are build-level configuration which have their own section under Build Configuration Settings.) XML Report Processing imports results from external tools. One supported result type is Ant JUnit. There is a Karma plugin which reports Karma results in JUnit format. I think you should be able to add the plugin to Karma and configure XML Report Processing to read the results.

I haven't tried this myself, so let us know how it goes.

Dave Schweisguth
  • 36,475
  • 10
  • 98
  • 121
  • 1
    Aha. I understood how to get "beautifull" test results. First way you described in your answer. Another way: you can use [karma-teamcity-reporter](https://www.npmjs.com/package/karma-teamcity-reporter). I am using Karma as test runner, so I just enabled this reporter (reporter is sending teamcity messages to stdout => teamcity is getting info about tests. – Sharikov Vladislav Apr 04 '16 at 07:16