Create a simple maintenance suite

Important: With the Flash deprecation at the end of 2020, we have made a new solution available that replaces the Perfecto native automation commands clean device, reboot device, and get network settings. For details, see Deploy device maintenance scripts (Perfecto IDE alternative).

This article and video takes the Perfecto IDE as an example of how a simple maintenance script can be implemented.

Devices that form part of the individual clouds are real devices, and as such not built for 24/7 usage under full load.

Maintenance of these devices should therefore contain a reboot among other checks, and be either run by a schedule (such as daily or weekly), or triggered by an action (such as before each main regression suite).

Frequency depends on the amount of tests run and the model of devices.

Generally, the more tests we execute against a specific device, and the older (or less reliabe) the device is, the more often we should reboot the device.

How to set up a maintenance suite

Such a maintenance suite, which would consist of a number of maintenance actions to be performed, can then be set up to run in parallel on specified devices.
Actions could be to reboot the device, recover, reset wifi (switching off-on), verify internet connectivity, verify mobile network or wifi connected, install/uninstall required apps etc.

Such a maintence job can be implemented in Appium/Selenium with a programming language of our choice, by using pure REST API calls, or by using the Perfecto IDE- the editor built into Perfecto Lab.

The referenced short video covers the following:

  • Setup within Perfecto IDE, 
  • Creation of a simple maintenance script
  • Creation of a calling script, essentially a test suite
  • Adding parallel execution to the suite
  • Driving the script with a Datatable containing the devices wanting to cover