Install something risky in a copy

Try an installer or a messy change on a copy of a device, or save a snapshot first, so a bad install costs you a copy and not your working device.

You will end up with a way to try something you don’t trust yet, and a way back if it goes wrong.

The situation

You want your agent to install a tool, change a setting or run a script that might leave a mess. You’d like the mess to land somewhere you can throw away.

Option 1: work in a copy

You make the copy, then point your agent at it.

  1. Pick a device that is set up the way you like. Mac, Ubuntu and Android devices can be copied, as they are now or from a saved point.
  2. Choose Make a Copy and give the copy a name, like Scratch.
  3. Ask your agent to use the copy:

Use the Castle device called Scratch. Install the tool from https://example.com/tool, open it and tell me whether it works. Give the device back when you are done.

A copy is a device of its own, so changes there don’t touch the device it came from. If you don’t trust what it runs, set its Network to Offline; what that cuts depends on the kind of device (see How devices are kept apart), and on an Android emulator it is best effort. If it goes badly, remove the copy and make another. A copy shares disk space with what it was made from where your disk allows, so it does not start from a second full install. You can copy a device as it is now, or from a saved snapshot.

Option 2: save a snapshot first

A snapshot is a named save point of a device. Castle never makes one on its own.

  1. Save a snapshot before the agent starts.
  2. Let the agent work.
  3. If it goes wrong, return the device to the snapshot.

Castle offers snapshots where the device can keep one. Your own phone and an iPhone never have them. See Known limitations.

Good to know

  • A Mac copy counts while it runs. See Mac devices.
  • Castle never removes a device or a snapshot on its own.

Next

Run tests on a Linux machine with no screen: Run tests on Ubuntu Server.

Last updated

View as Markdown