UI Configuration - TestlumFramework/Testlum GitHub Wiki
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 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>
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 |
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.
It is a command where you can set up details for conducting your web test scenario, such as
takeScreenshots
,elementAutowait
andbrowsers
.
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 |
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 |
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
Allows to configure different types of Google Chrome, Opera, Safari, Microsoft Edge and Firefox browsers, such as
localBrowser
,remoteBrowser
andbrowserInDocker
.
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
It is a command within which you can choose needed browser type, such as:
localBrowser
,remoteBrowser
,browserStack
andbrowserInDocker
.
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 |
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 |
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 |
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
Allows to set and use any capabilities for test execution. The same command is able to use with other browsers, that Testlum supports.
Attribute | Type | Required | Default | Description |
---|---|---|---|---|
name | String | true | - | Is used to enter capability name |
value | String | true | - | Value for the specific capability |
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>
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 |
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.
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 |
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 |
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 ofbrowserStack
orappiumServer
can be selected.
This command indicates that this configuration is for using BrowserStack for testing.
This command indicates that this configuration is for using Appium Server for testing.
This command is used to configure the Appium server URL.
Devices
Command where you can declare multiple devices and where you can easily switch between them.
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
This command indicates the Appium server configuration.
Appium Capabilities
Represents the name of the mobile device on which the testing will be performed.
Specifies the version of the mobile operating system.
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.
This command indicates the Browser Stack configuration.
Browser Stack Capabilities
Represents the name of the mobile device on which the testing will be performed.
Specifies the version of the mobile operating system.
Allows to set and use any capabilities for test execution. The same command is able to use with other browsers, that Testlum supports.
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>
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 |
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 |
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 |
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 ofbrowserStack
orappiumServer
can be selected.
This command indicates that this configuration is for using BrowserStack for testing.
This command indicates that this configuration is for using Appium Server for testing.
This command is used to configure the Appium server URL.
Devices
Command where you can declare multiple devices and where you can easily switch between them.
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
This command indicates the Appium server configuration.
Appium Capabilities
Represents the name of the mobile device on which the testing will be performed.
Specifies the version of the mobile operating system.
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.
Specifies the package name of the Android app you want to test. This is required when testing Android apps.
defines the main activity within the Android app that you want to launch. It's also used in Android app testing.
This command indicates the Browser Stack configuration.
Browser Stack Capabilities
Represents the name of the mobile device on which the testing will be performed.
Specifies the version of the mobile operating system.
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.
Command to automatically login into your Google Play account.
password
- Password from Google Play account.
Allows to set and use any capabilities for test execution. The same command is able to use with other browsers, that Testlum supports.
BrowserStack Login Configuration
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 from the Stack browser which can be found by path: Account & Profile/View profile.
Access Key from the Stack browser which can be found by path: Account & Profile/View profile.