Ideas and tips for temporal unit-testing?

后端 未结 5 1696
刺人心
刺人心 2021-01-05 05:41

Has anyone done temporal unit-testing?

I\'m not even sure if such lingo has been coined or not, but the point is to test that operations perform within temporal lim

5条回答
  •  悲&欢浪女
    2021-01-05 06:31

    I think you could do regression checks over unit-test runtime figures. With a lot of the unit test frameworks you can typically get a report that says testname, executiontime. I know junit/surefire does it. So basically you can compare this to previous runs and establish if any significant changes have taken place. If you keep all of this in a database (with the hostname) you can compare execution times for the same run-time environment to previous test-runs. In this way you don't really write tests for performance but you just assert separately that there have been no significant changes to execution-time.

提交回复
热议问题