---
title: "iOS instrument with Jenkins"
author: "EdwPhoebus"
date: "2013-10-15T23:37:28Z"
tags: []
categories: ["移动开发"]
slug: "ios-instrument-with-jenkins"
draft: false
lastmod: "2013-10-15T23:37:28Z"
id: 1958643
url: "https://edwphoebus.iteye.com/blog/1958643"
---

为了即将到来的iPad application, 在准备好了web平台的自动化架构以后，开始着手于iOS的自动测试，对于instrument的使用大概有了一定的了解。接下来想到的是如何在让instrument能在CI下继续运行。

 

在macbook控制台输入命令:

 

instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate "/Users/phoebusliang/Library/Developer/Xcode/DerivedData/TestAutomation-bugcjfamytbwgtgxgmfhxfcvkxru/Build/Products/Release-iphonesimulator/TestAutomation.app" -e UIASCRIPT "/Users/phoebusliang/Documents/xcode/workspace/TestAutomation/TestAutomation/TestUI/Test-1.js" -e UIARESULTSPATH "/Users/phoebusliang/Documents/output"

 

首先一个问题是我们如何找到TestAutomation.app 这个文件

1 打开TestAutomation.app这个工程，然后shift+command+2或者Window-&gt;Organizer

2 选中你的工程然后看到Derived Date,点击arrow,这样就可以得到TestAutomation.app的路径

 

其他的双引号括起来的分别是脚本路径以及trace path