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

后端 未结 10 827
有刺的猬
有刺的猬 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条回答
  •  庸人自扰
    2021-02-01 06:26

    The goal is 100s of tests per second. The way you get there is by following Michael Feather's rules of unit tests.

    An important point that came up in a past CITCON discussion is that if your tests aren't this fast it is quite likely that you aren't getting the design benefits of unit testing.

提交回复
热议问题