Configure test variables

To enhance the effectiveness, flexibility, and maintainability of your tests, you can use test variables. Variables allow you to store and reuse values across multiple test cases or test steps. They also make it easy to change input data or expected values without modifying the entire test. This is helpful when you need to run the same test with different inputs or adapt tests to changing application features or test senarios.

As your test suite grows, variables also help you maintain consistency, which is important for scalability.

Each test variable consists of the following attributes:

  • Name: Any string that contains letters, numbers, and the underscore character '_' . It cannot begin with a number.
  • Type: Test variable types are: Boolean, DataTable, Device, Number, Media, Secured String, and String.

  • Value: Depends on the selected variable type. For example, if Type = Device, the value will be set using the Select Device dialog box and if Type = Media, the value is selected from the repository or the local computer.

By default, a DUT (Device Under Test) variable is available for every test. A DUT variable is essential to execute a test. By default, the DUT variable selects the opened device as its value. You can select a device as a value for the variable.

To learn how to configure test variables in Scriptless Mobile, watch this video or review the instructions following the video.