Adding unit testing to an existing asp.net web forms application

前端 未结 4 2005
一个人的身影
一个人的身影 2021-01-13 04:25

I have an existing asp.net webforms application that I would like to add some unit testing to but am unsure of exactly how to go about it.

The application is databas

4条回答
  •  一个人的身影
    2021-01-13 05:19

    The first thing you need to decide is: What is your motivation for adding unit tests?

    There are many excellent reasons for having unit tests (I rigorously practice TDD myself), but knowing which one is the main driving force in your case should help you decide which tests to first write.

    In most cases you should concentrate on writing unit tests for the areas of your application that have been causing you the most pain in the past.

    Much experience has shown that when software originally was written without unit tests, it can be hard to subsequently retrofit unit tests. Working Effectively with Legacy Code provides valuable guidance on how to make an untested software projects testable.

提交回复
热议问题