iOS Automation Testing Setup: Hardware, Software, Xcode and Instruments Guide
This guide details the required Mac hardware, essential software tools, Xcode and Instruments usage, and step‑by‑step procedures for performing iOS automation testing, including UIAutomation scripting and common terminal commands for developers.
1. Hardware Requirements A Mac computer with at least a dual‑core 4 GB RAM and Intel i5‑i7 CPU is required. Options include an iMac, MacBook Pro (preferred over Air), or Mac mini; using Hackintosh or virtual machines is not recommended. For device testing, an iPhone or iPad—preferably jail‑broken to avoid developer certificates—is needed.
2. Software Preparation The environment must run macOS 10.8+ (latest as of 2016 is 10.11.1) and Xcode 5.0+ (preferably 7.2 for iOS 8 compatibility). A valid developer or enterprise certificate is required (or a pirated one can be bought). Python 2.5‑2.7 (system‑provided) is preferred over 3.x. Additional tools include TuneUp (open‑source automation runner), FruitStrap (for handling different iOS versions), Taobao’s Athrun & InstrumentDriver (Java‑based automation framework), and Sublime Text for script editing.
3. Xcode and Instruments Overview Xcode is Apple’s integrated development environment supporting multiple languages and frameworks; Instruments, bundled with Xcode, records app performance metrics across six categories: User Events, CPU & Processes, Memory, File Activity, Network Activity, and Graphics. The guide explains how to launch Instruments via Xcode’s menu, Dock, or by long‑pressing the Run button and selecting Profile.
4. Using Instruments for UIAutomation After opening Instruments, select the Automation template, choose the demo project (e.g., demo_hello ) and target device (simulator or real device). Switch to Script mode, start recording, and the tool generates UIAutomation JavaScript. Insert delays with UIATarget.localTarget().delay(2) as needed, then view logs in the Trace pane.
5. Editing Scripts and Terminal Commands Save generated scripts to Sublime Text for editing. Common macOS terminal commands useful for navigation and file operations are highlighted: pwd (print working directory), ls (list contents), cd (change directory), mkdir (make directory), cp (copy files), mv (move/rename), rm (remove files), and top (display system resource usage).
Baidu Intelligent Testing
Welcome to follow.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.