Set debugging options

On BrowserStack App Automate, you can debug and fix your failed Appium tests using screenshots, video recording and a variety of logs. Set the required capabilities in your Appium test scripts to enable the desired debugging tools.

Text logs

Text logs are a comprehensive record of your test sessions. They are used to identify all the steps executed in the test and troubleshoot errors for any failed steps. Text logs are accessible both from the App Automate dashboard, as well as using our REST API.

Text logs are enabled by default, and cannot be disabled.

Network logs

Network Logs capture performance data such as network traffic, latency, HTTP requests and responses in the HAR (HTTP Archive) format. You can download network logs using both the App Automate dashboard, as well as using our REST API. You can visualise HAR files using a HAR Viewer.

Network Logs are disabled by default. To enable network logs, use the browserstack.networkLogs capability as shown below :

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("browserstack.networkLogs", "true");
var capabilities = {
	'browserstack.networkLogs': 'true'
}
DesiredCapabilities capability = new DesiredCapabilities();
capability.SetCapability("browserstack.networkLogs", "true");
$capabilities = new DesiredCapabilities();
$capabilities->setCapability("browserstack.networkLogs", "true");
desired_cap = {
	'browserstack.networkLogs': 'true'
}
desired_caps = {
    'browserstack.networkLogs': 'true'
}

Device logs

Device logs are system logs specific to your application generated by iOS or Android. They can help you access your application logs and are especially helpful if the application under test crashes during test execution.

Device logs are enabled by default. To disable device logs, use the browserstack.deviceLogs capability as shown below :

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("browserstack.deviceLogs", "false");
var capabilities = {
	'browserstack.deviceLogs': 'false'
}
DesiredCapabilities capability = new DesiredCapabilities();
capability.SetCapability("browserstack.deviceLogs", "false");
$capabilities = new DesiredCapabilities();
$capabilities->setCapability("browserstack.deviceLogs", "false");
desired_cap = {
	'browserstack.deviceLogs': 'false'
}
desired_caps = {
    'browserstack.deviceLogs': 'false'
}

Appium logs

Appium logs are generated by the Appium server and contain detailed record of your Appium test sessions. They can help you troubleshoot any errors if your test has failed.

Appium logs are enabled by default. To disable Appium logs, use the browserstack.appiumLogs capability as shown below :

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("browserstack.appiumLogs", "false");
var capabilities = {
	'browserstack.appiumLogs': 'false'
}
DesiredCapabilities capability = new DesiredCapabilities();
capability.SetCapability("browserstack.appiumLogs", "false");
$capabilities = new DesiredCapabilities();
$capabilities->setCapability("browserstack.appiumLogs", "false");
desired_cap = {
	'browserstack.appiumLogs': 'false'
}
desired_caps = {
    'browserstack.appiumLogs': 'false'
}

Visual logs

Visual Logs enables you to automatically capture screenshots for various Appium commands executed in your tests. They can help detect the exact step where the failure occurred. They also help identify any layout or design related issues in your application.

Visual logs are disabled by default. To enable visual logs, use the browserstack.debug capability as shown below :

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("browserstack.debug", "true");
var capabilities = {
	'browserstack.debug': 'true'
}
DesiredCapabilities capability = new DesiredCapabilities();
capability.SetCapability("browserstack.debug", "true");
$capabilities = new DesiredCapabilities();
$capabilities->setCapability("browserstack.debug", "true");
desired_cap = {
	'browserstack.debug': 'true'
}
desired_caps = {
    'browserstack.debug': 'true'
}

Video recording

Every test run on the BrowserStack is recorded exactly as it is executed on our remote device. This feature is particularly helpful whenever a test fails - it helps you see the entire test in action. You can access these videos from the App Automate dashboard for each test. You can also download the videos from the dashboard or retrieve a link to download the video using our REST API.

Video logs are enabled by default. Note that video recording slightly increases the text execution time. You can disable them by using the browserstack.video capability as shown below :

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("browserstack.video", "false");
var capabilities = {
	'browserstack.video': 'false'
}
DesiredCapabilities capability = new DesiredCapabilities();
capability.SetCapability("browserstack.video", "false");
$capabilities = new DesiredCapabilities();
$capabilities->setCapability("browserstack.video", "false");
desired_cap = {
	'browserstack.video': 'false'
}
desired_caps = {
    'browserstack.video': 'false'
}
Note: Your test execution data, including videos, screenshots, and logs, are retained on BrowserStack for 60 days from day of test execution