karma-runner / karma-runner/karma

Karma outputs multiple success lines when unit tests are run

Open
#1,194 7 comments 2 reactions 0 assignees View on GitHub
needs: investigation type: bug
Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

I use karma for running mocha unit tests. I used to get one success line with cumulative result of all tests. Something like:

```
PhantomJS 1.9.7 (Mac OS X): Executed 16 of 19 (skipped 3) SUCCESS (0 secs / 0.005
```

Now, all of a sudden, I am getting multiple success lines starting with test 8:

```
PhantomJS 1.9.7 (Mac OS X): Executed 8 of 19 (skipped 3) SUCCESS (0 secs / 0.005
PhantomJS 1.9.7 (Mac OS X): Executed 9 of 19 (skipped 3) SUCCESS (0 secs / 0.005
PhantomJS 1.9.7 (Mac OS X): Executed 10 of 19 (skipped 3) SUCCESS (0 secs / 0.00
PhantomJS 1.9.7 (Mac OS X): Executed 11 of 19 (skipped 3) SUCCESS (0 secs / 0.00
PhantomJS 1.9.7 (Mac OS X): Executed 12 of 19 (skipped 3) SUCCESS (0 secs / 0.00
PhantomJS 1.9.7 (Mac OS X): Executed 13 of 19 (skipped 3) SUCCESS (0 secs / 0.00
PhantomJS 1.9.7 (Mac OS X): Executed 14 of 19 (skipped 3) SUCCESS (0 secs / 0.00
PhantomJS 1.9.7 (Mac OS X): Executed 15 of 19 (skipped 3) SUCCESS (0 secs / 0.01
PhantomJS 1.9.7 (Mac OS X): Executed 16 of 19 (skipped 3) SUCCESS (0 secs / 0.01
PhantomJS 1.9.7 (Mac OS X): Executed 16 of 19 (skipped 3) SUCCESS (0.013 secs / 0.01 secs)`
```

Any idea what could cause this? This is not something code related, since I've tried older commits and they all show multiple lines now. Thanks.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the output with Karma running Mocha unit tests under PhantomJS 1.9.7 on Mac OS X, and compare the behavior with older commits as reported. Trace the test-runner output path to determine why progress is emitted as multiple success lines; done means the run produces the expected single cumulative success line.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.