Unit test execution speed (how many tests per second?)

后端 未结 10 798
有刺的猬
有刺的猬 2021-02-01 05:31

What kind of execution rate do you aim for with your unit tests (# test per second)? How long is too long for an individual unit test?

I\'d be interested in knowing if

10条回答
  •  梦毁少年i
    2021-02-01 06:08

    Some frameworks provide automatic execution of specific unit tests based on heuristics such as last-modified time. For Ruby and Rails, AutoTest provides much faster and responsive execution of the tests -- when I save a Rails model app/models/foo.rb, the corresponding unit tests in test/unit/foo_test.rb get run.

    I don't know if anything similar exists for other platforms, but it would make sense.

提交回复
热议问题