Note: In this article, we will use the jailbroken iPhone 6 that was created in our Quickstart for iOS tutorial.
What are Snapshots?
Snapshots give you the ability to save the state of a device and then restore or clone that state at a moment’s notice. Save valuable setup time by instantly returning to a previously saved state, creating clones to run multiple tests from the exact same starting environment, or providing all students in a virtual classroom an identical starting VM.
In comparison to recreating a test environment on a real device, Snapshots can significantly reduce the time to reproduce bugs or repeat tests. You can take up to 5 snapshots per virtual device.
Every virtual device automatically captures a new snapshot right after the initial creation, providing a quick and easy way to revert back to that fresh image. You can take up to five snapshots per virtual device.
You must turn off virtual Android devices to take a snapshot.
Taking a Snapshot
This tutorial will demonstrate Snapshots by creating and restoring them.
Go to the device created in the Quickstart for iOS tutorial.
Power down the device by clicking the power symbol.
- Take a snapshot by opening the Snapshot menu then clicking TAKE NEW SNAPSHOT.
- Now we have saved a snapshot let's break the device. Click on CONSOLE.
- Power the device back on by clicking the power button.
- In the Console, push return to display sh-5.0 #, type
rm -rf /etc, then push return again.
- Now restart the device.
- The device will fail to boot, and the console will periodically display wdog restart. This will validate the device is broken as it has the inability to log in normally.
Restoring a Snapshot
- Now we are going to restore the snapshot. Click the Snapshot button.
- Click "RESTORE" next to "Snapshot #1". The device will be restored.
- You will be able to validate the device is working by booting up to the home screen as usual.