为App Store单元测试 [英] Unit testing for the app store

查看:204
本文介绍了为App Store单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

林新在编写iOS应用程序,并已接近完成写我的第一场比赛。香港专业教育学院的在线阅读单元测试和了解,我真的应该已经考虑到这一点从一开始编码(嗯哦...)。

Im new at writing iOS apps, and have nearly finished writing my first game. Ive read online about unit testing and understand that I really should have been coding with this in mind from the beginning (uh oh...).

我的应用程序是约4000 code线,包括8类和50的方法。

My app is about 4000 lines of code, and includes 8 classes and about 50 methods.

我应该关心的单元测试?究竟是什么?而我必须这样做之前,我提交到App Store ??

Should I be concerned about unit testing? What is it exactly? and Do I have to do it before I submit to the App Store??

任何答案或有用资源的链接将大大AP preciated。谢谢!

any answers or links to helpful resources would be greatly appreciated. Thanks!

推荐答案

有许多不同的哲学的单元测试。单元测试是更多的使用在开发过程中,因此,如果您需要进行更改,你可以让他们不用担心尽可能多的变化将打破你没有想到相关的东西。基本上,它会被写入调用内部的游戏方法,用不同的参数,并检查结果是否如预期的其他方法。

There are lots of different philosophies on unit testing. Unit testing is more of use during development, so that if you want to make changes you can make them without worrying as much your change will break something you do are not thinking is related. Basically it would be writing other methods that call your internal game methods with different parameters and check to see if the results are as expected.

您不必为App Store单元测试 - 机会是你一直以来的作为你开发测试游戏,并且该用户测试对于得到的东西释放(因为这意味着它可能会很多更重要不会崩溃),也当然,这使得一个更好的游戏!

You do not need to unit test for the app store - chances are you have been testing the game all along as you have developed, and that user testing is a lot more important for getting something released (as it means it probably will not crash) and also of course that makes for a better game!

最后要注意,如果你正在考虑在未来的单元测试有一个缺点。这也意味着更多的工作时,重写code,你不仅要改变你原来的code,而且相关的测试,并确保其结果,他们正在寻找有意义。对于一个人的开销可能没有意义;它是更有益的,当很多人都将更改相同code。

One final note, if you are thinking about unit testing in the future there is a downside. It can also mean more work when re-writing code as you not only have to change your original code, but also related tests and make sure the results they are looking for make sense. For a single person that overhead may not make sense; it is more helpful when many people will be changing the same code.

这篇关于为App Store单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆