How to record tests

After connecting to an instrumented build, choose the Recorder tab and press the Start Recording button.

Start recording

You’ll be able to record the following commands:

Load scene

Go to the Manage Scenes button, choose the way you want to load the scene (Single or Additive) and select the scene you want to be loaded in the test.

Load a scene with Single selected:

Load single

Load a scene with Additive selected:

Load additive

Wait for object

With Select object active, click on any element from the screenshot area or from the game objects hierarchy area to record a step that waits for the selected object to be present.

Wait for object

Click on object

With Select object inactive and Default action set to Click/Press, choose Click objects from the dropdown then, by clicking on an object in the screenshot area, it will record the click command on that object.

Click on object

Click on coordinates

With Select object inactive, choose Click coordinates and then, by clicking on an object in the screenshot area, it will record the click command on the screen position where the click was made.

Clock on coordinates

Tap on object

Now change the Default action to Tap/Swipe, keep Select object inactive. Choose Click objects from the dropdown and tap on an object in the screenshot area. This will record a tap command on the selected object.

Tap on object

Tap on coordinates

Keep the Default action set to Tap/Swipe and Select object inactive. Choose Click coordinates from the dropdown and tap on an object in the screenshot area. This will record a BeginTouch and an EndTouch command on the screen position where the tap was made.

Tap on coordinates

Swipe

Keep the Default action set to Tap/Swipe and Select object inactive. Choose Click objects from the dropdown and swipe from one object to another one. In the example below the swipe was recorded from the StoreButton to the StartButton.

Tap on coordinates

Hold button

In this case the Default action can be any of the two options and Select object should be inactive. Choose Click objects from the dropdown and hold a button for a longer period of time (a couple seconds). In the example below a longer left click was performed on the Settings button.

Tap on coordinates

If the click action takes at most 0.2 seconds, then a Click action is recorded; otherwise if the click takes longer then a HoldButton is recorded with a parameter indicating the length of the action.

Press key

Press any key that controls your game. In the example below the left arrow was pressed to avoid an obstacle on the road.

Press key

Set text

For objects that have a text component, like a label, button, input field etc., you can select the Text input field in the game element details area and change the content during recording. After hitting enter, a new step will be generated in the test that sets the text from the object to the one that was given.

Before changing the text:

Before changing text

After changing the text:

After changing text

Add assertion

For objects that have a text component, you can click on the Text label in the game element details area and it will record a WaitForComponentProperty command on the input field’s current content. This is equivalent to an assertion with the only difference that it has a timeout and will wait 20 seconds, by default, for the appropriate variable to have the specified value.

Alt text

You can also navigate to the Fields and Properties columns and click on a primitive field/property label. This will also generate a WaitForComponentProperty command in the recorded steps.

Alt text