The Appurify SDK allows developers to record test automation scripts simply by interacting with their application. These scripts can then be uploaded to Appurify’s testing platform, and even converted into UI Automation test cases that can be extended and updated.
Note: The Appurify SDK is designed for use on real devices only and will not compile for the Simulator SDK.
- Link the Appurify SDK static library and the IOSurface framework into your Target. We recommend creating a separate Target to avoid unnecessarily linking the SDK into your production build.
- At the top of your UIApplicationDelegate add the following:
#import "Appurify_Debugger.h"
- Inside the didFinishLaunchingWithOptions method add
[AppurifyDebugger load];
- Finally, add the following to your UIViewController. This will trigger the SDK UI when the user shakes the device.
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
if (motion == UIEventSubtypeMotionShake)
{
[[AppurifyDebugger sharedDebugger] toggleActivation];
}
}
To record a test case, start by shaking the device to launch the SDK’s UI. Then tap the Start Event Recorder button.
At this point, all UI interactions will be recorded by the SDK. When you are done recording your test case simply shake the device again and tap the Stop Event Recorder button.
- To retrieve your test case, you must be on the same wi-fi network as the device. Start by shaking the device to bring up the UI, and tap the Start HTTP Server button.
- Next, you’ll need to get the IP Address of the device. To do this use the IP Address option on the Appurify SDK.
- Now that you have the IP Address, just plug it into a browser with port # 8080. This will display the contents of the web server running on the device.
- Inside the Tests directory you’ll find all of your test recordings, which you can download by clicking on them.
- Finally, when uploading your test to the Appurify platform, simply select Appurify Recording for the Test Type.
- On your mobile device under Settings\Safari\Advanced make sure “Web Inspector” is turned on.
- On your desktop open Safari. Then, under Preferences\Advanced, make sure “Show Develop menu in menu bar” is enabled.
-
With your app running, plug your device into your desktop.
-
On your desktop, under the Safari \ Develop menu select your application from the list.
- Now, you can analyze your Webview and see detailed network output just like the app were running on your desktop machine!