Post-mortem unit testing

前端 未结 4 2099
半阙折子戏
半阙折子戏 2021-02-20 03:14

I do version control with Git, and unit testing with QUnit. Sometimes I find a bug in my software that was not present in a past version. It\'s easy for me to write a unit test

4条回答
  •  庸人自扰
    2021-02-20 03:41

    You described the job of git bisect. The Git Book has a good tutorial.

    There is also some confusion in the terms of your question: When a test is used to guard against re-introduction of previously fixed errors or for bisection of buggy commits, it is called a regression test, not a unit test. The latter test is purely testing if a given small unit of code works, and is under heavy time constraints (TDD people run unit tests several dozen times in a day). For a large project, you usually have much longer regression tests than unit tests, so you might want to get the categories clean.

提交回复
热议问题