Does TDD apply well when developing an UI?

前端 未结 10 1082
野趣味
野趣味 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:44

    Yes, you can use TDD with great effect for GUI testing of web apps.

    When testing GUI's you typically use stub/fake data that lets you test all the different state changes in your gui. You must separate your business logic from your gui, because in this case you will want to mock out your business logic.

    This is really neat for catching those things the testers always forget clicking at; they get test blindness too !

提交回复
热议问题