Skip to content

Add ReadMe tip for speeding up unit tests #3190

Closed

Description

@JeremyTCD

OS?

Windows 10

Version

v1.0.0-beta.20-1

Repro steps

  1. Run ng test with chrome in focus.

  2. Run ng test with chrome minimized.

  3. Test run time can differ by more than an order of magnitude.

Other details that might be useful

I was running ~200 tests (30 of them were component tests). Execution time was either ~0.7s or ~20s and the test runner would eventually crash. Turns out the slow and unstable tests were a result of chrome being out of focus. Chrome windows that are out of focus get throttled.

Looking through the rebuild speed thread, #1980, I noticed some complaints about ng test test speed. Specifically this comment. I'd like to suggest including a tip in ReadMe to keep chrome in focus. Since this is quite a hard to diagnose issue I think it will be very helpful.

Activity

  1. filipesilva commented on Dec 12, 2016

    @filipesilva
    Contributor

    The problem with ng test in that thread was mostly fixed by #2840, because at the time code coverage was always being added.

    A comment like this would be nice, even though there isn't anything else we can do. Would you be interested in adding it?

  2. added
    P5The team acknowledges the request but does not plan to address it, it remains open for discussion
    area: docsRelated to the documentation
    on Dec 12, 2016
  3. antonybudianto7 commented on May 3, 2017

    @antonybudianto7
  4. filipesilva commented on May 22, 2017

    @filipesilva
    Contributor

    Newer karma-chrome-launcher versions fix this automatically.

  5. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  6. locked and limited conversation to collaborators on Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P5The team acknowledges the request but does not plan to address it, it remains open for discussionarea: docsRelated to the documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions