Why are functional tests not enough? What do unit tests offer?

前端 未结 8 1172
庸人自扰
庸人自扰 2020-12-25 09:02

I just had a conversation with my lead developer who disagreed that unit tests are all that necessary or important. In his view, functional tests with a high enough code cov

8条回答
  •  长情又很酷
    2020-12-25 09:44

    If you use a pure Extreme Programing / Agile Development methodology the Unit tests are always required as they are the requirements for development.

    In pure XP/Agile one makes all requirements based on the tests which are going to be performed to the application

    • Functional tests - Generate functional requirements.
    • Unit tests - Generate functions or object requirements.

    Other than that Unit testing can be used to keep a persistent track of function requirements.

    i.e. If you need to change the working way of a function but the input fields and output keep untouched. Then unit testing is the best way to keep tracking of possible problems as you only need to run the tests.

提交回复
热议问题