适用于iPhone的XCode测试自动化 [英] XCode Test Automation For IPhone

查看:114
本文介绍了适用于iPhone的XCode测试自动化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让我的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:


  1. 编译,链接和代码签署iphone应用程序(Xcodebuild)

  2. 将新构建的应用程序上传到iphone

  3. 自动在iphone中运行上传的应用程序

  4. 从gdb控制台收集结果

  5. 关闭应用程序

  1. compile, link and code sign the iphone app (Xcodebuild)
  2. upload the newly built app to iphone
  3. run the uploaded app in iphone automatically
  4. collect the result from the gdb console
  5. 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屋!

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