Configuration File
:::caution Boyka framework is driven byboyka-config.json configuration file. You must have this file in order to use the framework.
:::
Configuration is stored in boyka-config.json file. This file is in JSON format. Following is the logic which Boyka-framework will find the config file:
- First it will check for the config folder in the
BOYKA_CONFIG_PATHenvironment variable - If the environment variable is not set, then it will check
boyka.config.pathsystem property - If the system property is not set, then by default, it will check in the
src/test/resourcesfolder of your root project path
boyka-config.json
:::
Configuration file sample
boyka-config.json
Configuration File properties
| Property | Description | Type | Default |
|---|---|---|---|
ui | Contains UI platform specific configuration. See UI Config below. | object | |
api | Contains API platform specific configuration. See API config below. | object | |
listeners_package | This will be the package name under which all the Boyka framework listeners are saved. | string | |
data | Contains Test data related configurations. See Test data configuration below | TestDataSetting | |
common_setting | Contains Common settings for different platforms. See Common Setting configuration below | CommonSetting |
UI Configuration
| Property | Description | Type | Default |
|---|---|---|---|
timeout | Contains timeout configuration. See Timeout Config below. | TimeoutSetting | |
logging | Contains logging specific configuration. See Logging Config below | LoggingSetting | |
screenshot | Contains screenshot configuration. See Screenshot Config below. | ScreenshotSetting | |
web | Contains web platform configuration. See Web Config below. | Map<String, WebSetting> | |
mobile | Contains Mobile platform configuration. See Mobile Config below. | object | |
delay | Contains settings for delay between actions. See DelaySettings | DelaySetting |
ui configuration block, you can provide different versions of web settings having different key names under web object.
See the example in sample configuration file.
:::
Timeout Configuration
| Property | Description | Type | Default |
|---|---|---|---|
implicit_wait | Implicit wait for finding the elements on UI (in seconds). | number | 1 |
explicit_wait | Explicit wait for finding the elements on UI (in seconds). | number | 1 |
page_load_timeout | Page load timeout for waiting for page to load (in seconds). | number | 30 |
script_timeout | Script timeout for waiting for page to load (in seconds). | number | 30 |
highlight_delay | Delay for element getting highlighted | long | 100 |
UI Logging Configuration
| Property | Description | Type | Default |
|---|---|---|---|
enable | Determines whether logging is enabled for the framework | boolean | true |
exclude_logs | Exclude any specific logs which is supported by Drivers | List<string> | null |
path | Path where the logs will be saved | string | {root-folder}/logs |
Screenshot Configuration
| Property | Description | Type | Default |
|---|---|---|---|
enabled | Enable/disable screenshot capturing | boolean | true |
path | Path to the directory where screenshots are stored | string | ./screenshots |
extension | Extension of the screenshot file | string | jpeg |
prefix | Prefix of the screenshot file | string | SCR |
Delay Configuration
| Property | Description | Type | Default |
|---|---|---|---|
before_click | Delay before clicking on an element | int | 0 |
before_mouse_move | Delay before moving the mouse | int | 0 |
before_swipe | Delay before swiping | int | 500 |
before_tap | Delay before tapping on an element | int | 0 |
before_typing | Delay before typing any text | int | 0 |
Web Configuration
| Property | Description | Type | Default |
|---|---|---|---|
base_url | Base URL to navigate to by default | string | null |
browser | Browser name | Browser | Browser.NONE |
version | Browser Version | string | stable |
protocol | Protocol type, will override Host provided by Target provider | Protocol | Protocol.HTTP |
host | Remote driver host name, will override Host provided by Target provider | string | null |
port | Remote driver port, if 0, port will not be considered | number | 0 |
target | Target provider name | TargetProviders | TargetProviders.LOCAL |
platform | Platform name for the Browser | string | null |
user_name | User name for cloud service provider | string | null |
password | Password / Access key for cloud service provider | string | null |
capabilities | Capabilities for browser | Map<String, Object> | null |
headless | Headless mode for browser | boolean | true |
highlight | Highlight element on interaction, if true | boolean | false |
resize | How to resize the window initial state | WindowResizeType | WindowResizeType.NORMAL |
custom_size | Custom window size, when resize option is selected as CUSTOM | Dimension | 1920x1080 |
page_load_strategy | Page loading strategy (all in capital letters) | PageLoadStrategy | NORMAL |
user_name and password, you can use placeholder variables in the following format:
| Input type | Variable sample |
|---|---|
| Base64 Decoder | ${base64Decoder:SGVsbG9Xb3JsZCE=} |
| Base64 Encoder | ${base64Encoder:HelloWorld!} |
| Java Constant | ${const:java.awt.event.KeyEvent.VK_ESCAPE} |
| Date | ${date:yyyy-MM-dd} |
| DNS | ${dns:address|apache.org} |
| Environment Variable | ${env:USERNAME} |
| File Content | ${file:UTF-8:src/test/resources/document.properties} |
| Java | ${java:version} |
| Localhost | ${localhost:canonical-name} |
| Properties File | ${properties:src/test/resources/document.properties::mykey} |
| Resource Bundle | ${resourceBundle:org.example.testResourceBundleLookup:mykey} |
| Script | ${script:javascript:3 + 4} |
| System Property | ${sys:user.dir} |
| URL Decoder | ${urlDecoder:Hello%20World%21} |
| URL Encoder | ${urlEncoder:Hello World!} |
| URL Content (HTTP) | ${url:UTF-8:http://www.apache.org} |
| URL Content (HTTPS) | ${url:UTF-8:https://www.apache.org} |
| URL Content (File) | ${url:UTF-8:file:///${sys:user.dir}/src/test/resources/document.properties} |
| XML XPath | ${xml:src/test/resources/document.xml:/root/path/to/node} |
Mobile Configuration
| Property | Description | Type | Default |
|---|---|---|---|
server | Contains Appium Server related configurations | ServerSetting | |
device | Contains Mobile test device related configurations | DeviceSetting |
Appium Server Configuration
| Property | Description | Type | Default |
|---|---|---|---|
protocol | Protocol type of the server host | Protocol | HTTP |
host | Host of the server | string | |
port | Port on which server will run | int | |
base_path | Base path of the server | string | |
external | Set true if using already running server, else framework will start the server automatically | boolean | false |
session_override | Enables session override | boolean | false |
node_path | Node executable path | string | |
appium_path | Appium executable main.js path | string | |
target | Target provider name | TargetProviders | TargetProviders.LOCAL |
user_name | User name for cloud service provider | string | null |
password | Password / Access key for cloud service provider | string | null |
allow_insecure | Allow list of features in server considered as insecure | List<string> | |
timeout | Timeout in seconds for server to start | int | 30 |
driver | Appium automation driver type | AutomationType | null |
allow_cors | If set to true, will enable CORS | boolean | false |
callback_address | Callback IP address | string | null |
callback_port | Callback Port number | int | 0 |
deny_insecure | Set which insecure features are not allowed to run in this serverβs sessions | List<string> | null |
keep_alive_timeout | Number of seconds the Appium server should apply as both the keep-alive timeout and the connection timeout for all requests | int | 0 |
logging | Logging related settings | LogSetting | null |
plugins | Use a single or a list of Appium plugins | List<string> | null |
relaxed_security | Disable additional security checks, so it is possible to use some advanced features, provided by drivers supporting this option | boolean | false |
strict_capabilities | Cause sessions to fail if desired caps are sent in that Appium does not recognize as valid for the selected device | boolean | false |
webhook | Also send log output to this http listener | string | null |
other_args | Any other Appium server arguments which is currently not supported by Boyka, you can use them in this setting | Map<string, string> | null |
Server Logging Setting
| Property | Description | Type | Default |
|---|---|---|---|
debug_spacing | Add exaggerated spacing in logs to help with visual inspection | boolean | false |
level | Log level | LogLevel | INFO |
local_timezone | Use local timezone for timestamps | boolean | false |
timestamp | Show timestamps in console output | boolean | false |
Mobile Device Configuration
| Property | Description | Type | Default |
|---|---|---|---|
name | Device Name | string | |
os | Device OS type | OS | ANDROID |
version | Device OS version | string | |
type | Device type | DeviceType | VIRTUAL |
capabilities | Contains cloud specific capabilities | Map | |
application | Contains application related configs | ApplicationSetting | |
virtual_device | Contains virtual device specific configs | VirtualDeviceSetting | |
clear_files | Determines if system files needs to cleared after run completes on a device | boolean | true |
clear_logs | Determines if device logs needs to be cleared | boolean | true |
full_reset | Determines if full reset needs to be done | boolean | |
no_reset | Determines if there should be no reset | boolean | |
accept_alerts | Determines if auto accept alerts is needed | boolean | true |
ignore_unimportant_views | Determines if unimportant views needs to be ignored | boolean | true |
server_install_timeout | Timeout in seconds to wait for Appium server app to get installed | int | 30 |
server_launch_timeout | Timeout in seconds to wait for Appium server app to start | int | 30 |
adb_timeout | Timeout in seconds to wait for ADB commands to get executed | int | 30 |
swipe | Swipe specific setting | SwipeSetting | |
wda | WebDriverAgent specific settings for iOS | WDASetting | |
typing_speed | Max typing speed for iOS | int | 60 |
chrome_driver_port | Chrome driver port for Android devices | int | 0 |
system_port | System port for Android devices | int | 8200 |
unique_id | Device UDID | string | null |
video | Video recording related settings | VideoSetting | null |
Device Application Configurations
| Property | Description | Type | Default |
|---|---|---|---|
base_url | Base URL to navigate to by default | string | null |
browser | Browser name. | Browser | null |
external | Is the app saved outside src/test/resources folder? | boolean | false |
path | Path to the AUT, can also contain environment variables for cloud App URL | string | |
type | Application type | ApplicationType | NATIVE |
install_timeout | Timeout in seconds to wait until app gets installed on device | int | 30 |
wait_activity | Wait for the mentioned activity to load | string | |
wait_timeout | Wait timeout in seconds to wait for AUT | int | 30 |
bundle_id | iOS application bundle id | string | null |
chrome_driver_port | Port on which Chrome driver would run | int | 0 |
Virtual Device Configurations
| Property | Description | Type | Default |
|---|---|---|---|
name | Name of AVD | string | |
launch_timeout | Timeout in seconds to wait until AVD launches | int | 60 |
headless | Determine if required to run in headless mode | boolean | false |
ready_timeout | Timeout in seconds to wait until AVD is ready | int | 60 |
connect_keyboard | Should iOS simulator connect to hardware keyboard? | boolean | false |
Swipe Configuration
| Property | Description | Type | Default |
|---|---|---|---|
distance | Amount of distance to swipe from the center of the screen to the edge of the screen or element | int | 25 |
max_swipe_until_found | Maximum amount of time to swipe until an element is found on the screen | int | 5 |
speed | Speed of swipe action | Speed | FAST |
Swipe Speed
FAST: Speed of100msis used while swipingNORMAL: Speed of500msis used while swipingSLOW: Speed of1000msis used while swiping
WebDriverAgent Configuration
| Property | Description | Type | Default |
|---|---|---|---|
local_port | This value, if specified, will be used to forward traffic from Mac host to real ios devices over USB. Default value is the same as the port number used by WDA on the device under test | int | 8100 |
use_new | If true, forces uninstall of any existing WebDriverAgent app on device | boolean | false |
launch_timeout | Timeout to wait for WebDriverAgent to be pingable | int | 60 |
startup_retries | Number of times to try to build and launch WebDriverAgent onto the device | int | 2 |
connection_timeout | Connection timeout to wait for a response from WebDriverAgent | int | 60 |
startup_retry_interval | Time interval to wait between tries to build and launch WebDriverAgent | int | 10 |
use_prebuilt | If true, uses existing WebDriverAgent app on device | boolean | false |
update_bundle_id | Bundle id to update WDA to before building and launching on real devices. This bundle id must be associated with a valid provisioning profile | string | null |
team_id | Apple developer team identifier string. Must be used in conjunction with xcodeSigningId to take effect. e.g., JWL241K123 | string | null |
signing_id | String representing a signing certificate. Must be used in conjunction with xcodeOrgId. This is usually just iPhone Developer | string | null |
Video recording Configuration
| Property | Description | Type | Default |
|---|---|---|---|
enabled | Set it to true to enable video recording for Mobile automation | boolean | false |
path | Path to the folder where video recording will be saved | string | ./videos |
prefix | Prefix for the video file name | string | VID |
size | Size of the video screen in WIDTHxHEIGHT | string | null |
time_limit | Time limit of the video recording. Maximum 30 mins of recording is supported | integer | 0 |
android | Android specific video record settings | AndroidVideoSetting | default instance |
ios | iOS specific video record settings | IOSVideoSetting | default instance |
Android video recording configurations
| Property | Description | Type | Default |
|---|---|---|---|
bit_rate | Bit rate of video recording. Value will be internally multiplied by 100000 | int | 4 |
iOS video recording configurations
| Property | Description | Type | Default |
|---|---|---|---|
fps | Frames per second between range of 1 to 60 | int | 10 |
codec | Video codec type to be used for encoding the video. Use the value from the output of command ffmpeg -codecs | string | mpeg4 |
quality | Video encoding quality. It can be any of LOW, MEDIUM, HIGH, PHOTO | io.appium.java_client.ios.IOSStartScreenRecordingOptions.VideoQuality | MEDIUM |
API Configuration
Common Configuration
| Property | Description | Type | Default |
|---|---|---|---|
api | Contains Common API settings | CommonApiSetting |
Common API Configuration
| Property | Description | Type | Default |
|---|---|---|---|
base_path | Base path of the API. | string | |
timeout | Timeout specific settings | TimeoutSetting | |
logging | Logging configuration. See Logging Config below. | object | |
schema_path | Path of schema file at location src/test/resources | string | |
validate_ssl | If set to true, SSL validation will happen | boolean | true |
verify_host_name | If set to true, host name verification will happen | boolean | true |
api | Different API Configurations | ApiSetting |
Specific API Configuration
| Property | Description | Type | Default |
|---|---|---|---|
base_uri | Base URL of the API. | string | |
base_path | Base path of the API. | string | |
port | Port of the API. | number | |
timeout | Timeout specific settings | TimeoutSetting | |
logging | Logging configuration. See Logging Config below. | object | |
schema_path | Path of schema file at location src/test/resources | string | |
validate_ssl | If set to true, SSL validation will happen | boolean | true |
verify_host_name | If set to true, host name verification will happen | boolean | true |
api configuration block, you can provide different versions of API settings having different key names.
See the example in sample configuration file.
:::
:::info Tip!
If any setting is missing in the API block, the common API setting will be used.
:::
Timeout Configurations
| Property | Description | Type | Default |
|---|---|---|---|
connection_timeout | Connection timeout in seconds for the API. | number | 5 |
read_timeout | Read timeout in seconds for the API. | number | 5 |
write_timeout | Write timeout in seconds for the API. | number | 5 |
Test Data Configuration
| Property | Description | Type | Default |
|---|---|---|---|
path | Path to the folder of test data | string | test-data |
external | If false, by default test data path will be searched in src/test/resources | boolean | false |
type | Type of test data file | TestDataSource | EXCEL |
extension | Test data file extension | string | xlsx |
Logging Configuration
| Property | Description | Type | Default |
|---|---|---|---|
request | Log request information. | boolean | true |
response | Log response information. | boolean | true |
Supported Browsers
We have an enumBrowser where we maintain the list of supported browsers. They are:
CHROME: Is used for Chrome browser.EDGE: Is used for Edge browser.FIREFOX: Is used for Firefox browser.NONE: No browser will be used.REMOTE: Is used for Cloud based browsers.SAFARI: Is used for Safari browser.
Supported Protocols
We have an enumProtocol where we maintain the list of supported protocols. They are:
HTTP: Is used for HTTP protocol.HTTPS: Is used for HTTPS protocol.
Target Providers
We have an enumTargetProviders where we maintain the list of supported target providers. They are:
LOCAL: Local provider will be used.BROWSER_STACK: Is used for BrowserStack cloud provider.LAMBDA_TEST_WEB: Is used for LambdaTest cloud provider to run on Web browsers.LAMBDA_TEST_MOBILE: Is used for LambdaTest cloud provider to run on Mobile devices.
TargetProviders name.
:::
Supported Device OS
We have an enumOS where we maintain the list of currently supported device OS types. They are:
ANDROIDIOS
Supported device types
CLOUDVIRTUAL
Supported Automation types
UI_AUTOMATOR: Equivalent forUIAutomator2in AppiumXCUI: Equivalent forXCuiTestin Appium
Supported Server Log levels
DEBUGDEBUG_DEBUGDEBUG_ERRORDEBUG_INFODEBUG_WARNERRORERROR_DEBUGERROR_ERRORERROR_INFOERROR_WARNINFOINFO_DEBUGINFO_ERRORINFO_INFOINFO_WARNWARNWARN_DEBUGWARN_ERRORWARN_INFOWARN_WARN
Window Resize Types
CUSTOM: You can define custom window sizeFULL_SCREEN: Opens the window in full screen modeMAXIMIZED: Opens the window maximized (if supported by your platform)MINIMIZED: Opens the window minimizedNORMAL: Opens the window in default state
Supported Application Types
NATIVE: Native Mobile applicationHYBRID: Hybrid Mobile applicationWEB: Web Mobile application
Test Data Source types
EXCEL: Excel test data file
