Instruments CLI does not run automation using valid device (
| Originator: | jlipps | ||
| Number: | rdar://17363642 | Date Originated: | 6/18/2014 |
| Status: | Duplicate | Resolved: | Duplicate |
| Product: | Instruments | Product Version: | 6 |
| Classification: | Serious Bug | Reproducible: | Always |
[this was resolved as a dupe of 17157825)
Summary:
I use the instruments CLI to kick off UIAutomation tests. The CLI has a -w flag which allows the use of a specific device (or simulator) on which to run a script. This is made initially difficult by issue 17362829 (Instruments CLI does not recognize valid devices), but I discovered that by trying substrings of the valid devices, I was able to get further. Automation is ultimately blocked, with the error "Instruments : Instruments Rejected Command"
Steps to Reproduce:
1. Install XCode/CLI tools
2. Run an instruments automation command using a valid device:
/Applications/Xcode6-Beta.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode6-beta.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -w "iPhone 5s (8.0 Simulator)" /path/to/my.app -e UIASCRIPT /path/to/my/test.js -e UIARESULTSPATH /tmp
Expected Results:
I expect an iPhone 5s simulator to launch and my test script to run.
Actual Results:
Instead, the instruments CLI quits with no output. If I rerun the command with the `-v` flag, i.e.:
/Applications/Xcode6-Beta.app/Contents/Developer/usr/bin/instruments -v -t /Applications/Xcode6-beta.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -w "iPhone 5s (8.0 Simulator)" /path/to/my.app -e UIASCRIPT /path/to/my/test.js -e UIARESULTSPATH /tmp
We get some more interesting output:
Instruments : template : file:///Applications/Xcode6-beta.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate
Instruments : Plugin Search Paths (
"/Applications/Xcode6-Beta.app/Contents/Applications/Instruments.app/Contents/PlugIns",
"/Applications/Xcode6-Beta.app/Contents/Applications/Instruments.app/Contents/PlugIns",
"/Applications/Xcode6-Beta.app/Contents/Applications/Instruments.app/Contents/PlugIns/DTracePlugin",
"/Applications/Xcode6-Beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Instruments/PlugIns"
)
Instruments : Loaded Instruments (
<removed for space>
"Instrument Type (name:Automation; category:UI Automation; uuid:com.apple.xray.instrument-type.UIAutomation)"
)
Instruments : Loading template 'file:///Applications/Xcode6-beta.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate'
Instruments : Setting Instrument Trace Command : Instrument Command (purpose:Idle; output destination:file:///Users/saucelabs/Code/appium/instrumentscli1.trace)
Instruments : Trace Command Recognized
Instruments : Instrument 'Automation - TestApp' rejected command 'Instrument Command (purpose:Trace; output destination:file:///Users/saucelabs/Code/appium/instrumentscli1.trace)' for target '< PFTProcess 0x7fbb540d0550 : TestApp.app > {
executable: /Users/saucelabs/Code/appium/sample-code/apps/TestApp/build/Release-iphonesimulator/TestApp.app
device: < XRSimulatorDevice 0x7fbb51e462b0 : iPhone 5s (8.0 Simulator) (7538FB7A-DF4B-45FD-B7C5-F9D53BA8FEB6) >
args: (
)
environment: {
UIARESULTSPATH = "/tmp";
UIASCRIPT = "/Users/saucelabs/test.js";
}
}'
Instruments : Instruments Rejected Command
Notice that instruments appears to find the correct device, but ultimately rejects the automation trace command.
Version:
Xcode 6
Instruments 6
OS X 10.10
Notes:
Related: 17362829 (Instruments CLI does not recognize valid devices)
Configuration:
All configurations
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!