适用于iPhone的XCode测试自动化 [英] XCode Test Automation For IPhone
问题描述
我想让我的iphone测试应用程序在iPhone中自动测试。以下是我想要的步骤:
I would like to have my iphone test app to be tested automatically in an IPhone. The following are the steps I would like to have:
- 编译,链接和代码签署iphone应用程序(Xcodebuild)
- 将新构建的应用程序上传到iphone
- 自动在iphone中运行上传的应用程序
- 从gdb控制台收集结果
- 关闭应用程序
- compile, link and code sign the iphone app (Xcodebuild)
- upload the newly built app to iphone
- run the uploaded app in iphone automatically
- collect the result from the gdb console
- close the app
现在,我遇到第2步和第3步的问题,我不能自动执行(我可以通过构建和调试按钮从XCode执行此操作。但是,这需要手动点击)。
Right now, I have problem with step 2 and 3 where I cannot do it automatically (I can do it from XCode via "Build and Debug" button. This, however, will require manual clicking).
我做了一些关于自动机的研究它没有回答我的问题。我正在考虑的另一个选择是为iphone模拟器编译应用程序并从那里运行它,但我不确定测试结果与真实设备相比有多准确。
I did some research on automator and it does not answer my problem. Another option I am thinking about is to have the app compiled for iphone simulator and run it from there, but I am not sure how accurate the test result will be comparing to the real device.
我是Mac / IPhone开发的新手,也许有人有更好的方法来测试它。欢迎任何反馈和意见。谢谢。
I am new to Mac/IPhone development, perhaps someone has a better way of testing this. Any feedback and input are welcome. Thanks.
推荐答案
您可能想要用于构建和安装的工具是Applescript。类似于:
The tool you probably want to use for the build and install is Applescript. Something like:
tell application "Xcode" to launch
我不是假装这是一个完整的答案;还有很多事情需要解决。但是Applescript将成为我相信的关键工具之一。
I'm not pretending that this is a complete answer; there are still a lot of things to work out. But Applescript is going to be one of your key tools I believe.
这篇关于适用于iPhone的XCode测试自动化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!