winterbe / jest-teamcity-reporter

Teamcity Reporter for Jest Unittest Results
https://www.npmjs.com/package/jest-teamcity-reporter
Other
50 stars 23 forks source link

Mismatch in test counts #8

Closed blainekasten closed 7 years ago

blainekasten commented 7 years ago

I'm not sure where this could be going wrong. But this is what I'm seeing in TC.

Build tab: image

Tests Tab: image

I'm curious why the Tests tab would only report 785 when jest reports 1128

richardscarrott commented 7 years ago

@blainekasten Do you use forceExit in jest?

blainekasten commented 7 years ago

nope.

winterbe commented 7 years ago

Hm, strange. Which Teamcity version do you use?

blainekasten commented 7 years ago

TeamCity Enterprise 9.1.6 (build 37459)

On Mon, Jan 23, 2017 at 2:22 AM, Benjamin Winterberg < notifications@github.com> wrote:

Hm, strange. Which Teamcity version do you use?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/winterbe/jest-teamcity-reporter/issues/8#issuecomment-274425288, or mute the thread https://github.com/notifications/unsubscribe-auth/ACx-twih2IRV21qKBle2FyOI-3UgTg-zks5rVGNFgaJpZM4LiCCC .

winterbe commented 7 years ago

Sorry, can't help on this one. I'm using TC Professional 10.0.1 and can't reproduce this problem.

Is it possible for you to test with latest TC 10 release?

richardscarrott commented 7 years ago

Yeah we're seeing the same problem in TC 9.1

blainekasten commented 7 years ago

@winterbe I have no control over our TC version. Is there anything we can do to help you support this version?

winterbe commented 7 years ago

This Jest Reporter relies on the TC build script interaction. Maybe something has changed between TC9 and TC10 which causes the issue.

However the total test count is not reporter by this project, it's measured by TC. So I really don't know why it's not working in TC9. I also don't have a TC9 installation in order to reproduce the issue.

You should check the TC Youtrack for open bugs regarding reported test count. Also feel free to debug this for your own. Feel free to send a PR if you find a fix.

ToshB commented 7 years ago

I have a similar issue in TC10.0: Log Output: 6 skipped, 118 passed, 124 total Reports as 109 Tests passed

Then someone checked in an it.only-statement, halving the number of actual run tests, which should have triggered a warning in Teamcity, but the reporter reported an increase in the number of tests:

Log Output: 69 skipped, 59 passed, 128 total Reports as 113 Tests passed

bumbu commented 7 years ago

Same issue with TeamCity Enterprise 2017.1.1

tmeador-dl commented 7 years ago

It looks like this might be happening because only the it statement descriptions are being reported, and not the combined describe/it descriptions. For instance I have multiple it statements that read 'should have property theSameProperty' but in different describe blocks. These tests are showing up in TeamCity as a single test with multiple run counts. (TeamCity Enterprise 10.0.2.)

Ant-VAV commented 7 years ago

Same issue with TeamCity Enterprise 2017.1.2

Ant-VAV commented 7 years ago

As one of possible methods to solve this issue: https://github.com/winterbe/jest-teamcity-reporter/pull/16

winterbe commented 7 years ago

I just published the fix from @Ant-VAV (thanks for that). Please test again with version 0.7.0 to verify that the problem is solved.