Skip to main content

Set mobile OS version using Regular Expression

info

This feature is applicable for mobile browser and mobile app testing.

In TestOps, you can run tests with TestCloud's Any device option within a desired range of OS versions. This allows for more flexible and targeted test execution. To specify a custom OS version range, you need to use regular expressions (RegEx).

Follow the steps below to set a custom OS version for your TestCloud devices.

Set custom OS version

  1. Go to Test Execution > Schedule Test Run.

    The Schedule Test Run dialog pops up.

  2. In the Environment section, click the drop-down menu and select More options.

    Select more options
  3. In Mobile Browsers or Mobile Native App configuration tab, scroll to the bottom of OS version column and select Custom.

    Select custom settings
  4. To set the Regex value for your OS version, refer to the table below.

    Custom version dialog
    Regex charactersDescriptionExample
    .*Match any version that starts with the given string.
    In the given example, your device will be allocated any version that starts with 13.
    (13.*)
    ,Include more combinations of different versions.
    In the given example, the regex characters .* and , are combined to match any OS version containing 13, 14, or 15.
    (13.*), (14.*), (15.*)
    []Include a range of versions in the combination mentioned using a single character only.
    In the given example, TestCloud will fetch any OS version available from 12, 13, 15.
    1[235]
    ^Is used to negate a character from the search.
    In the given example, this matches OS versions that begin with 1 and do not have 5 as the next character.
    1[^5].*
    |Match any of the specified versions in the list.
    In the given example, | and .* are used together to fetch any available OS version containing 13 or 14.
    (1(3|4).*)
  5. Click Save. TestCloud will display the Regex value accordingly.

    Regex OS version displayed
note

When a custom OS version is selected, the device column updates to Any Phone/Any Tablet for Android, or Any iPhone/Any iPad for iOS.

Result

You can schedule and run tests with the configured custom OS version.

Was this page helpful?