It is too difficult to run a UI Automation script from the command line
| Originator: | kristopherdjohnson | ||
| Number: | rdar://20167804 | Date Originated: | 15-Mar-2015 06:57 PM |
| Status: | Closed | Resolved: | There are no plans to address this. |
| Product: | Developer Tools | Product Version: | 6.2 |
| Classification: | UI/Usability | Reproducible: | Always |
Summary:
The Instruments User Guide, in the "Executing an Automation Instrument Script from the Command Line" section of the "Automating UI Testing" chapter, provides instructions for running a UI Automation script from the command line. There are two problems:
1. The instructions are incorrect and incomplete.
2. Even if the instructions were correct, the process of figuring out how to run an automation script is complicated.
Here is an example of an actual command-line automation script invocation that works:
instruments -w /Users/kdj/Library/Developer/CoreSimulator/Devices/06995493-FDEA-406A-B9BD-797B812AE77E -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate /Users/kdj/Library/Developer/CoreSimulator/Devices/06995493-FDEA-406A-B9BD-797B812AE77E/data/Containers/Bundle/Application/E37FE608-A0DA-4AB0-8B49-A9985231A73E/KJTipCalculator.app/KJTipCalculator -e UIASCRIPT /Users/kdj/work/iOS/KJTipCalculator/UIAutomationTests/KJTipCalculatorUITests.js -e UIARESULTSPATH /tmp/KJTipCalculatorUITestsResults
Obviously, it is not feasible for a user to type that at the command line. It should not be necessary for users to write complex scripts or use third-party tools to simply run their unit tests.
It would be very helpful if the "instruments" command-line tool was updated so that running a script in the iOS Simulator was as simple as this:
instruments myapp.app -uia mytestscript.js
and like this for running on a device:
instruments -w <device_id> myapp.app -uia mytestscript.js
It would also be helpful if Xcode could be configured to run an automation script. Currently, a user can only specify that Instruments should be launched, and all steps after that are manual.
Steps to Reproduce:
N/A
Expected Results:
N/A
Actual Results:
N/A
Version:
Xcode 6.2
Notes:
The incorrect documentation for running a script is here: https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/UsingtheAutomationInstrument/UsingtheAutomationInstrument.html
Configuration:
Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!