0

Runs fine from the Xcode Automator Instruments app.

It will sometimes run once and then fail on every attempt afterwards.

I have tried creating a fresh Instruments tracetemplate file with just a single test that clicks one button on the app's opening page (without providing a test script parameter), this also fails.

I have tried deploying a fresh version of the app to a new simulator device (5, 5S, 6, etc), this also fails.

"Enable UI Automation" is enabled in the virtual devices' Settings.

Running from Terminal with this command:

instruments -w '75B90531-10BC-4E6B-A174-A31C588576B7' -t \ '/Users/username/Library/Application Support/Instruments/Templates/SmokeTestTemp1.tracetemplate' \ '/Users/username/Library/Developer/Xcode/DerivedData/Whoop-gysnfwujthrwqhhfbakwvfxuxurd/Build/Products/Debug-iphonesimulator/APPNAME.app' \ -e UIASCRIPT /Users/username/createUser.js \ -e UIARESULTSPATH /Users/username/Desktop/testoutput

This is the response in terminal:

2016-01-29 08:03:04.914 instruments[7625:406549] Automation Instrument ran into an exception while trying to run the script. UIAScriptAgentSignaledException 2016-01-29 13:03:04 +0000 Fail: An error occurred while trying to run the script. Instruments Trace Complete (Duration : 36.036934s; Output : /Users/username/qa-web/python/instrumentscli30.trace)

This is the automationresults.plist file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>All Samples</key>
    <array>
        <dict>
            <key>LogType</key>
            <string>Fail</string>
            <key>Message</key>
            <string>An error occurred while trying to run the script.</string>
            <key>Timestamp</key>
            <date>2016-01-29T13:13:41Z</date>
            <key>Type</key>
            <integer>7</integer>
        </dict>
    </array>
    <key>version</key>
    <integer>2</integer>
</dict>
</plist>

The instrumentscli31.trace file has 23.5mb worth of dtrace events, the trace log has one line:

An error occurred while trying to run the script.

OSX 10.11.4 beta (15E33e)

15" MBPr, 2.2GHz i7, 16GB RAM

XCode 7.2 (7C68)

Simulated iPhones iOS 9.2 (13C75)

Happy to provide more information, not sure what else would be useful.

spconrad
  • 50
  • 1
  • 6

1 Answers1

0

Coworker of mine figured it out; delete the DTrace tool in the Automation Instrument before saving the template.

Doesn't crash, still saves a log, happy times all around.

spconrad
  • 50
  • 1
  • 6