UI Configuration - TestlumFramework/Testlum GitHub Wiki

UI Configuration

ui.xml - is a file, where you can set configurations for the WEB, Native, and Mobile Browser tests.

Below you can find detailed explanation of configuration for WEB, Mobile Browser and Native Applications testing.

WEB

WEB Testing Configuration

Inside this command, you can configure all settings that needed to conduct the WEB test scenario.

Testlum supports testing for different browsers.

Let's quickly check the structure of web configuration and then go through each command.

<web enabled="false">
    <baseUrl>http://localhost:3000</baseUrl>
    <browserSettings>
        <takeScreenshots enabled="false"/>
        <elementAutowait seconds="5"/>
        <browsers>
            <chrome alias="CHROME_0" enabled="true" 
                    maximizedBrowserWindow="false" headlessMode="false"
                    browserWindowSize="1536x864">
                <browserType>
                    <localBrowser driverVersion="123"/>
                </browserType>
                <capabilities>
                    <capability name="test" value="test"/>
                </capabilities>
                <chromeOptionsArguments>
                    <argument>--remote-allow-origins=*</argument>
                </chromeOptionsArguments>
            </chrome>
        </browsers>
    </browserSettings>
</web>

web

It is entry point command to set up configurations for web testing.

Attribute Type Required Default Description
enabled Boolean true false Whether the configuration for web testing is enabled or not

baseUrl

It is a command for placing the base URL of the system under test.

All your interactions with in each test scenario will start from this web page.

browserSettings

It is a command where you can set up details for conducting your web test scenario, such as takeScreenshots, elementAutowait and browsers.

takeScreenshots

It is used to choose whether to make screenshots for each UI test step or not.

Screenshots will be taken after each individual step of the test and will be saved in the same folder where the test scenario is found.

Attribute Type Required Default Description
enabled Boolean true false Whether the making screenshot for web testing is enabled or not

elementAutowait

It is a command to configure auto wait for UI elements.

Testlum will automatically wait provided time in case of failure to immediately find an element on the page before returning an error.

Attribute Type Required Default Description
seconds Integer true - max seconds to wait

browsers

It is a command where you can choose different browsers for your UI test.

Currently, we are supporting next browsers: chrome, edge, safari, opera, firefox.

Supported Browsers and Configuration

chrome, edge, safari, opera, firefox

Allows to configure different types of Google Chrome, Opera, Safari, Microsoft Edge and Firefox browsers, such as localBrowser, remoteBrowser and browserInDocker.

Attribute Type Required Default Description
alias String true DEFAULT You can give an Alias to any browser
maximizedBrowserWindow Boolean true false When selected true, test scenarios will be executed on maximized browser window
headlessMode Boolean true false When selected false, browser window will be shown during test execution (available only for Chrome, Edge, Firefox)
browserWindowSize String false - When selected true, you can choose any window size for your UI test. Format: 1536x864
enabled Boolean true false Whether configured browser is enabled or not
Browser Types

browserType

It is a command within which you can choose needed browser type, such as: localBrowser, remoteBrowser, browserStack and browserInDocker.

localBrowser

It is a command, that allows to use locally installed web browser for conducting WEB test scenarios.

Attribute Type Required Default Description
driverVersion String false last stable driver version Is used to identify driver version of web browser, that you want to use while test execution

remoteBrowser

It is a command to configure remote browser settings that allows execute WEB test scenarios on remote web server.

Attribute Type Required Default Description
browserVersion String true - Here you can enter version of the browser, that you want to use
remoteBrowserURL String true - Attribute to place URL Selenium Grid for remote browser

browserInDocker

It is a command to configure browser in dockersettings.

Attribute Type Required Default Description
browserVersion String true - Here you can enter version of the browser, that you want to use
dockerNetwork String true - Is used to enter docker network
enableVNC Boolean false false When selected true, record of test execution will be saved on your computer and when selected false, record of test execution will not be saved on your computer, but you can see results of tests in logs and reports

browserStack

It is a command to configure browserStack settings.

Attribute Type Required Default Description
browserVersion String true - Here you can enter version of the browser, that you want to use
os String true - Is to identify OS
osVersion String true - Is to identify OS version
Capabilities

capabilities

Allows to set and use any capabilities for test execution. The same command is able to use with other browsers, that Testlum supports.

capability

Attribute Type Required Default Description
name String true - Is used to enter capability name
value String true - Value for the specific capability
Browser Options Arguments

browserOptionsArguments

Allows to set and use any browser options argument for test execution.

argument

Here you can enter needed browser options argument.

Mobile Browser

Mobile Browser Configuration

Inside this command you are able to configure all settings that needed to conduct mobilebrowser test scenario.

Testlum supports testing for different browsers.

Let's quickly check the structure of mobile browser configuration and then go through each command.

   <mobilebrowser enabled="false">
       <baseUrl>http://localhost:3000</baseUrl>
       <takeScreenshots enabled="false"/>
       <elementAutowait seconds="5"/>
       <connection>
           <browserStack/>
           <appiumServer>
               <serverUrl>http://127.0.0.1:4723/wd/hub</serverUrl>
           </appiumServer>
       </connection>
       <devices>
           <device platformName="android" enabled="true" alias="ANDROID_0">
               <appiumCapabilities>
                   <deviceName>PIXEL 5 API 31</deviceName>
                   <platformVersion>12.0</platformVersion>
                   <udid>emulator-5554</udid>
               </appiumCapabilities>
               <browserStackCapabilities>
                   <deviceName>Google Pixel 5</deviceName>
                   <platformVersion>12.0</platformVersion>
               </browserStackCapabilities>
           </device>
       </devices>
   </mobilebrowser>

mobilebrowser

It is entry point command to set up configurations for mobile browser testing.

Attribute Type Required Default Description
enabled Boolean true false Whether the configuration for mobile browser testing is enabled or not

baseUrl

It is a command for placing the base URL of the system under test.

All your interactions with in each test scenario will start from this mobile browser page.

takeScreenshots

It is used to choose whether to make screenshots for each mobile browser test step or not.

Screenshots will be taken after each individual step of the test and will be saved in the same folder where the test scenario is found.

Attribute Type Required Default Description
enabled Boolean true false Whether the making screenshot for mobile browser testing is enabled or not

elementAutowait

It is a command to configure auto wait for UI elements.

Testlum will automatically wait provided time in case of failure to immediately find an element on the page before returning an error.

Attribute Type Required Default Description
seconds Integer true - max seconds to wait

connection

It is a command where you can choose different ways to connect and configure device for testing.

Currently, we are supporting next connections: browserStack, appium.

Detailed guide for set up for mobile and native testing can be found here.

Supported way of Connection

⚠️ Warning
Only one of browserStack or appiumServer can be selected.

browserStack

This command indicates that this configuration is for using BrowserStack for testing.

Details how to set up your BrowserStack account.

appiumServer

This command indicates that this configuration is for using Appium Server for testing.

serverUrl

This command is used to configure the Appium server URL.

Devices

devices

Command where you can declare multiple devices and where you can easily switch between them.

device

This element may contain configurations or settings related to the devices on which you want to perform mobile testing.

Attribute Type Required Default Description
platformName String true - Option to choose Android or iOS
alias String true - You must give an Alias to any device
enabled Boolean true false The ability to choose whether this device will be connected or not
Capabilities

appiumCapabilities

This command indicates the Appium server configuration.

Appium Capabilities

deviceName

Represents the name of the mobile device on which the testing will be performed.

platformVersion

Specifies the version of the mobile operating system.

udid

The UDID (Unique Device Identifier) is typically used for identifying the specific device when running tests.

If the simulator is running, you can find UDID by executing the command in the terminal - adb devices.

browserStackCapabilities

This command indicates the Browser Stack configuration.

Browser Stack Capabilities

deviceName

Represents the name of the mobile device on which the testing will be performed.

platformVersion

Specifies the version of the mobile operating system.

capabilities

Allows to set and use any capabilities for test execution. The same command is able to use with other browsers, that Testlum supports.

Capabilities

capability

Attribute Type Required Default Description
name String true - Is used to enter capability name
value String true - Value for the specific capability
Browser Options Arguments

browserOptionsArguments

Allows to set and use any browser options argument for test execution.

argument

Here you can enter needed browser options argument.

Native Applications

Native Applications Configuration

Inside this command you are able to configure all settings that needed to conduct native test scenario.

Let's quickly check the structure of native configuration and then go through each command.

<native enabled="false">
        <takeScreenshots enabled="false"/>
        <elementAutowait seconds="5"/>
        <connection>
            <browserStack/>
            <appiumServer>
                <serverUrl>http://127.0.0.1:4723/wd/hub</serverUrl>
            </appiumServer>
        </connection>
        <devices>
            <device alias="NATIVE_0" platformName="android" enabled="true">
                <appiumCapabilities>
                    <deviceName>Pixel 5 API 31</deviceName>
                    <platformVersion>12.0</platformVersion>
                    <udid>emulator-5554</udid>
                    <appPackage>com.todoist</appPackage>
                    <appActivity>com.todoist.activity.HomeActivity</appActivity>
                </appiumCapabilities>
                <browserStackCapabilities>
                    <deviceName>Google Pixel 5</deviceName>
                    <platformVersion>12.0</platformVersion>
                    <app>bs://ee2287d922df499c6b828db048e33321535ea31b</app>
                </browserStackCapabilities>
                <capabilities>
                    <capability name="test" value="test"/>
                </capabilities>
            </device>
        </devices>
</native>

native

It is entry point command to set up configurations for native testing.

Attribute Type Required Default Description
enabled Boolean true false Whether the configuration for native testing is enabled or not

takeScreenshots

It is used to choose whether to make screenshots for each native test step or not.

Screenshots will be taken after each individual step of the test and will be saved in the same folder where the test scenario is found.

Attribute Type Required Default Description
enabled Boolean true false Whether the making screenshot for native testing is enabled or not

elementAutowait

It is a command to configure auto wait for UI elements.

Testlum will automatically wait provided time in case of failure to immediately find an element on the page before returning an error.

Attribute Type Required Default Description
seconds Integer true - max seconds to wait

connection

It is a command where you can choose different ways to connect and configure device for testing.

Currently, we are supporting next connections: browserStack, appium.

Detailed guide for set up for mobile and native testing can be found here.

Supported way of Connection

⚠️ Warning
Only one of browserStack or appiumServer can be selected.

browserStack

This command indicates that this configuration is for using BrowserStack for testing.

Details how to set up your BrowserStack account

appiumServer

This command indicates that this configuration is for using Appium Server for testing.

serverUrl

This command is used to configure the Appium server URL.

Devices

devices

Command where you can declare multiple devices and where you can easily switch between them.

device

This element may contain configurations or settings related to the devices on which you want to perform mobile testing.

Attribute Type Required Default Description
platformName String true - Option to choose Android or iOS
alias String true - You must give an Alias to any device
enabled Boolean true false The ability to choose whether this device will be connected or not
Capabilities

appiumCapabilities

This command indicates the Appium server configuration.

Appium Capabilities

deviceName

Represents the name of the mobile device on which the testing will be performed.

platformVersion

Specifies the version of the mobile operating system.

udid

The UDID (Unique Device Identifier) is typically used for identifying the specific device when running tests.

If the simulator is running, you can find UDID by executing the command in the terminal - adb devices.

appPackage

Specifies the package name of the Android app you want to test. This is required when testing Android apps.

appActivity

defines the main activity within the Android app that you want to launch. It's also used in Android app testing.

browserStackCapabilities

This command indicates the Browser Stack configuration.

Browser Stack Capabilities

deviceName

Represents the name of the mobile device on which the testing will be performed.

platformVersion

Specifies the version of the mobile operating system.

app

Refers to the mobile application (APK or IPA file) you want to test. You provide the key that you get when you download the application to the browser stack.

googlePlayLogin

Command to automatically login into your Google Play account.

  • email - Email from Google Play account.
  • password - Password from Google Play account.

capabilities

Allows to set and use any capabilities for test execution. The same command is able to use with other browsers, that Testlum supports.

Capabilities

capability

Attribute Type Required Default Description
name String true - Is used to enter capability name
value String true - Value for the specific capability
Browser Options Arguments

browserOptionsArguments

Allows to set and use any browser options argument for test execution.

argument

Here you can enter needed browser options argument.

BrowserStack Login

BrowserStack Login Configuration

browserStackLogin

Inside this command you are able to set BrowserStack credentials that needed to conduct test scenario on BrowserStack.

<browserStackLogin>
        <username>...</username>
        <accessKey>...</accessKey>
</browserStackLogin>

username

Username from the Stack browser which can be found by path: Account & Profile/View profile.

accessKey

Access Key from the Stack browser which can be found by path: Account & Profile/View profile.

⚠️ **GitHub.com Fallback** ⚠️