Does TDD apply well when developing an UI?

前端 未结 10 1073
野趣味
野趣味 2020-12-14 08:56

What are your opinions and experiences regarding using TDD when developing an user interface?

I have been pondering about this question for some time now and just ca

10条回答
  •  生来不讨喜
    2020-12-14 09:28

    I can't speak to Microsoft Silverlight, but I never use TDD for any kind of layout issues, just is not worth the time. What works well is using Unit Testing for checking any kind of wiring, validation and UI logic that you implemented. Most systems provide you with programmatic access to the actions the user takes, you can use these to assert that your expectations are correctly met. E.g. calling the click() method on a button should execute what ever code you intended. Selecting an item in a list view changes all the UI elements content to this items properties ...

提交回复
热议问题