What is the best approach for writing unit tests for iPhone / iPad?

后端 未结 2 1307
逝去的感伤
逝去的感伤 2021-01-03 11:29

I am developing an iPad application. I\'m not sure if I should write unit tests for this application, and if so, how I should go about writing them.

What would you

2条回答
  •  长情又很酷
    2021-01-03 12:21

    You will write the test once, but run it many times as your application evolves.

    If the tests pass, you know you didn't break anything. If the tests fail, you know where to fix. If the tests pass and the application fails, you know you need more tests.

    • In the long run writing the test will SAVE time.
    • In the short run you can validate you know what your individual routines do, and thus gain confidence in the correctness of your code, by writing the tests.

    Regardless what OS/platform your application targets, regardless of what size it has today ..

提交回复
热议问题