The pause action is used to pause an automated test for a given duration. It doesn't require any device, and it is only available in automated tests since it would be useless for manual testing. As a result, it is located in a separate section of the action menu:
The pause action in the menu
You may need it if you expect that a specific event will happen only after some time and you want your test to sleep until the moment that you expect this event to occur.
Duration options
You can choose a duration that will last for a specified number of seconds, minutes, hours or days:
Pause duration options
If you choose to pause for several days, you'll get an additional option to specify more accurately the moment your test should resume:
Pause for several days
This form lets you define at what time of the day (and on which timezone) to resume. You should think carefully when entering the values here. For instance, if you choose to pause for 1 day and ask to resume at noon (on your timezone), and if you launch the test after noon, then it will be paused for less than two days. If you launch the test before noon, it will be paused for a little longer than two days. Only if you launch the test exactly at noon, will it be paused for exactly two days, since it will resume at noon in two days.
Keep resources locked during pause
By default, when a test is paused, all its resources are freed. If you prefer to keep the resources locked (so that they cannot be used and locked by another test), just check the option Keep resources locked during pause.
Locking pause
Caveats
There are several things to keep in mind when it comes to pause actions:
-
Variables cannot be used in the pause duration field. The duration should be hardcoded. The form gives you a list of duration options, but you can also enter a custom number:
Custom duration
-
When a test enters the Sleeping state (the paused state), all its resources are released (unless you checked the option Keep resources locked during pause) and made available for other tests to use. This is useful because a test may be paused for weeks, and it would be a waste to keep its resources locked for all this time, while they are not being used at all by the paused test.
-
As a result, pausing a test without locking its resources doesn't guarantee that the test will resume at the exact moment after the pause duration is elapsed: when the pause duration is elapsed, in order for the test to resume, all its resources must be available. But a resource may be in use by another test at that same moment. So our paused test will have to wait until all the resources it needs are available again, and then it will effectively resume. For instance, a test paused for 10 seconds may resume after only 14 or 15 seconds if it requires a SIM that is not immediately available after the 10 seconds pause. If you want to avoid this potential problem, just check the option to keep the resources locked.
Finally, don't forget that you can always cancel a paused test if you need to. You don't have to wait for it to resume:
Canceling a paused test