如何测试我的 iOS 应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3801344/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I test my iOS Apps
提问by Daniel Chen
My question maybe silly, but can anyone coach me?
我的问题可能很愚蠢,但有人可以指导我吗?
Except doing some test(most likely white box testing) while coding, after the App was built, do we have some testing tools or special method for doing the test?
除了在编码时做一些测试(最有可能是白盒测试),App 构建完成后,我们是否有一些测试工具或特殊方法来进行测试?
All I can imaging for now, is only manual testing the functionality of my App.
我现在所能想象的只是手动测试我的应用程序的功能。
Thanks everyone.
谢谢大家。
回答by Jonas S?derstr?m
Update: Added section 'Automated testing for iOS4'
更新:添加了“iOS4 自动测试”部分
As a professional tester my suggestion is that you should have a healthy mix of automated and manual testing. The Examples below are in .net but it should be easy to find a tool for whatever technique you are using.
作为专业测试人员,我的建议是您应该将自动化和手动测试健康地结合起来。下面的示例在 .net 中,但应该很容易找到适合您使用的任何技术的工具。
AUTOMATED TESTING
自动化测试
Unit Testing
Use NUnit to test your classes, functions and interaction between them.
http://www.nunit.org/index.phpAutomated Functional Testing
If it's possible you should automate a lot of the functional testing. Some frame works have functional testing built into them. Otherwise you have to use a tool for it. If you are developing web sites/applications you might want to look at Selenium.
http://www.peterkrantz.com/2005/selenium-for-aspnet/Continuous Integration
Use CI to make sure all your automated tests run every time someone in your team makes a commit to the project.
http://martinfowler.com/articles/continuousIntegration.htmlAutomated testing for iOS4
Automate the testing of your application by scripting touch events using the new UIAutomation Instrument.
Some links:
单元测试
使用 NUnit 来测试您的类、函数以及它们之间的交互。
http://www.nunit.org/index.php自动化功能测试
如果可能,您应该自动化很多功能测试。一些框架作品内置了功能测试。否则,您必须为此使用工具。如果您正在开发网站/应用程序,您可能需要查看 Selenium。
http://www.peterkrantz.com/2005/selenium-for-aspnet/持续集成
使用 CI 确保每次团队中有人提交项目时,所有自动化测试都会运行。
http://martinfowler.com/articles/continuousIntegration.htmliOS4 的
自动化测试通过使用新的 UIAutomation Instrument 编写触摸事件脚本来自动化您的应用程序测试。
一些链接:
MANUAL TESTING
As much as I love automated testing it is, IMHO, not a substitute for manual testing. The main reason being that an automated can only do what it is told and only verify what it has been informed to view as pass/fail. A human can use it's intelligence to find faults and raise questions that appear while testing something else.
手动测试
尽管我喜欢自动化测试,恕我直言,它不能替代手动测试。主要原因是自动化只能做它被告知的事情,并且只能验证它被通知视为通过/失败的内容。人类可以使用它的智能来发现错误并提出在测试其他事物时出现的问题。
- Exploratory Testing
ET is a very low cost and effective way to find defects in a project. It take advantage of the intelligence of a human being and a teaches the testers/developers more about the project than any other testing technique i know of. Doing an ET session aimed at every feature deployed in the test environment is not only an effective way to find problems fast, but also a good way to learn and fun!
http://www.satisfice.com/articles/et-article.pdf
- 探索性测试
ET 是一种在项目中发现缺陷的成本非常低且有效的方法。它利用了人类的智慧,并且比我所知道的任何其他测试技术都更多地向测试人员/开发人员传授了该项目的知识。针对测试环境中部署的每个特性做一个ET session,不仅是快速发现问题的有效方法,也是一种学习和乐趣的好方法!
http://www.satisfice.com/articles/et-article.pdf
回答by Faris
Take a look at automated testing tools. Supports automated and manual testing/sending feedback from within the app with annotated screen shots
看看自动化测试工具。支持从应用程序内自动和手动测试/发送带有注释屏幕截图的反馈
回答by Alastair Stuart
I suggest you take a look at the iPhoneUnitTests sample codeposted by Apple on their developer site.
我建议您查看Apple 在其开发人员网站上发布的iPhoneUnitTests 示例代码。
回答by BigGorilla
FoneMonkey is a free and open source functional testing automation tool available for download from Gorilla Logic.
FoneMonkey 是一个免费的开源功能测试自动化工具,可从Gorilla Logic下载。
回答by sah
回答by Rosie Sherry
Much of testing any application is about understanding what you are testing and areas that should be tested. Some of this comes with experience, but types of things to consider testing about would be:
测试任何应用程序的大部分内容是了解您正在测试的内容和应该测试的区域。其中一些来自经验,但需要考虑测试的事情类型是:
Functionality
iOS Design Guidelines / UI
Gestures
Connectivity
Types of devices to test on
Audio
Data
Crash reporting
Analytics
功能
iOS 设计指南/用户界面
手势
连通性
要测试的设备类型
声音的
数据
崩溃报告
分析
There's a big list of areas to cover.
有一个大的LIS的地区盖吨。
回答by foFox
I recommend Kiwi, its used for Behavior Driven Development. By far my favorite testing framework, makes testing much more fun, and test much readable and clear.
我推荐 Kiwi,它用于行为驱动开发。到目前为止,我最喜欢的测试框架使测试变得更加有趣,并且测试更具可读性和清晰性。