Automated device testing

I am trying to run this post to run UIAutomation scripts on iOS devices from the command line, but I cannot get it to work.

This is the command I'm using right now: tools -t / Applications / Xcode.app / Contents / Applications / Instruments.app / Contents / PlugIns / AutomationInstrument.bundle / Contents / Resources / Automation.tracetemplate / Users / X / Library / Developer / Xcode / DerivedData / TestiPhoneAutomation2-dyufpxsavtdqkybpagcoawdudzid / Creation / Products / Debug-iphoneos / TestiPhoneAutomation2.app -e UIASCRIPT "/Users/X/Workspaces/TestiPhoneAutomation/testIIUES-XUES-XUES-XUES-2Up Users / "-w 80bf5b ... UDID ... dfb52543 -v

It works well on the simulator (replacing Debug-iphoneos with Debug-iphonesimulator, it also ignores -w in this case), but if I run it using an application compiled for the device, it crashes (I tried with release and debugging, I get same result).

The error I am getting is:

Malfunction threshold posix; launch interruption (binary == / Users / X / Library / Developer / Xcode / DerivedData / TestiPhoneAutomation 2-dyufpxsavtdqkybpagcoawdudzid / Build / Products / Debug-iphoneos / TestiPhoneAutomation2.app / TestiPhoneAutomation2). 2012-10-03 Tools 12: 10: 36.609 [76151: 1603] Recording canceled: Failed to start at least one target; interrupt Trace Trace Error: Could not start tracing.

+4
source share
3 answers

I have the same error, but I did not have multiple instances of the tools. I got this working by putting the -w UDID arguments in front of the application and only using the application name (with the application already deployed to the device).

On the command line, I use the following (with Xcode 4.6):

tools -t / Applications / Xcode.app / Contents / Applications / Instruments.app / Contents / PlugIns / AutomationInstrument.bundle / Contents / Resources / Automation.tracetemplate -w <device_id> <application_name> -e UIASCRIPT <path_to_script> -e UIARESULTSPATH <path_to_results>

+3
source

Pls verifies the UDID sequence on the command line in fact for all parameters that also run only in the debug version of the assembly. Hope this works because it works for me.

0
source

For everyone who has this problem, I will explain what worked for me and how I solved it.

I ran the ps command to see which processes are running. I found that the tools are still working. Then I did killall instruments and killed the instrument. Then I executed the command of my tools, and after that it worked perfectly.

0
source

Source: https://habr.com/ru/post/1437551/


All Articles