BEFORE TESTING...
• Your app must be in DEBUG mode
• App download from App Store / Test flight / Hockey App won’t work (which are in RELEASE mode)”
• To perform automation, your app is suggested to be built and run / profiled directly from Xcode
Run your app through Xcode
• One point to note: If you’d like to do this on a real device, remember to turn the following switch ON on your device.
• Settings > Developer > Enable UI Automation
READY TO TEST!Running automation on real device
Start scripting … orStart capturing!
• Automation basically supports Javascript, but even if you don’t know anything about programming, you can still create a testing script
• Use the Capture button
• Press on it. Start your actions. And they will be recorded as a script :D
Testing time!Record and trace log• To run the testing script, click the top left button
• To look at the logs during a test, select
Two tips on scriptingUIALOGGER• logFail
• logIssue
• logPass
• logStart
• logDebug
• logError
• logMessage
• logWarning
• Example:UIALogger.logPass(“User login success!”);
Two tips on scripting...ALERT HANDLER• Prepare an alert handler before the main script
• It will be triggered whenever an alert is detected
Just keep calm and run your test!Common problems And ANSWERS
• Testing on real device, but always no response on Capture/Stop instantly on run…Did you turn “Enable UI Automation” ON?
• Testing on simulator , but type string is not working…Go to Simulator Menu > Hardware > Keyboard > Toggle Software Keyboard
• Can I run multiple tests at the same time?Yes, you can run multiple instruments at the same time. But don’t add the same script to different instruments. They will overwrite each other.
But it’s not cool at all...
My script is still not working and I don’t know why?????
Add target.delay(1);