Skip to main content
Transform your testing process with: Real Device Features, Company-wide Licences, & App Percy
No Result Found

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.

If you are using BrowserStack SDK, you can set the following capabilities in the browserstack.yml file:

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 its capability as shown in the following code snippet:

Capability Description Expected values
networkLogs Enable network logs A string. Defaults to false
true if you want to enable network logs. false otherwise.
browserstack.yml
Copy icon Copy

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 its capability as shown in the following code snippet:

Capability Description Expected values
deviceLogs Enable device logs A string. Defaults to false
true if you want to enable visual logs
browserstack.yml
Copy icon Copy

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 its capability as shown in the following code snippet:

Capability Description Expected values
appiumLogs Enable Appium logs A string. Defaults to true. Set to false to disable Appium logs.
browserstack.yml
Copy icon Copy

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 its capability as shown in the following code snippet:

Capability Description Expected values
debug Enable visual logs A string. Defaults to false

true if you want to enable the visual logs. false otherwise.
browserstack.yml
Copy icon Copy

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. To disable video logs use its capability as shown in the following code snippet:

Capability Description Expected values
video Enable video recording A string. Defaults to true

true if you want to enable the video recording. false otherwise.
browserstack.yml
Copy icon Copy

BrowserStack SDK is a plug-n-play solution that takes care of all the integration steps for you. Using the BrowserStack SDK is the recommended integration method for your project. To know more, visit the SDK core concepts page.

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 its capability as shown in the following code snippet:

Capability Description Expected values
networkLogs Enable network logs A string. Defaults to false
true if you want to enable network logs. false otherwise.
DesiredCapabilities capabilities = new DesiredCapabilities();
HashMap<String, Object> browserstackOptions = new HashMap<String, Object>();
browserstackOptions.put("networkLogs", "true");
capabilities.setCapability("bstack:options", browserstackOptions);
var capabilities = {
	'bstack:options' : {
		"networkLogs" : "true",
	},
}
AppiumOptions capabilities = new AppiumOptions();
Dictionary<string, object> browserstackOptions = new Dictionary<string, object>();
browserstackOptions.Add("networkLogs", "true");
capabilities.setCapability("bstack:options", browserstackOptions);
$caps = array(
	'bstack:options' => array(
		"networklogs" => "true",
	),
)
desired_cap = {
	'bstack:options' : {
		"networkLogs" : "true",
	},
}
capabilities = {
	'bstack:options' => {
		"networkLogs" => "true",
	},
}
Capability Description Expected values
browserstack.networkLogs Enable network logs A string. Defaults to false
true if you want to enable network logs. false otherwise.
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("browserstack.networkLogs", "true");
var capabilities = {
	'browserstack.networkLogs' : 'true'
}
AppiumOptions capabilities = new AppiumOptions();
capabilities.AddAdditionalCapability("browserstack.networkLogs", "true");
$caps = array(
    "browserstack.networkLogs" => "true"
)
desired_cap = {
	'browserstack.networkLogs' : 'true'
}
caps = Selenium::WebDriver::Remote::Capabilities.new
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 its capability as shown in the following code snippet:

Capability Description Expected values
deviceLogs Enable device logs A string. Defaults to false
true if you want to enable visual logs
DesiredCapabilities capabilities = new DesiredCapabilities();
HashMap<String, Object> browserstackOptions = new HashMap<String, Object>();
browserstackOptions.put("deviceLogs", "false");
capabilities.setCapability("bstack:options", browserstackOptions);
var capabilities = {
	'bstack:options' : {
		"deviceLogs" : "false",
	}
}
AppiumOptions capabilities = new AppiumOptions();
Dictionary<string, object> browserstackOptions = new Dictionary<string, object>();
browserstackOptions.Add("deviceLogs", "false");
capabilities.setCapability("bstack:options", browserstackOptions);
$caps = array(
	'bstack:options' => array(
		"devicelogs" => "false",
	),
)
desired_cap = {
	'bstack:options' : {
		"deviceLogs" : "false",
	},
}
capabilities = {
	'bstack:options' => {
		"deviceLogs" => "false",
	},
}
Capability Description Expected values
browserstack.deviceLogs Enable device logs A string. Defaults to false
true if you want to enable visual logs
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("browserstack.deviceLogs", "false");
var capabilities = {
	'browserstack.deviceLogs' : 'false'
}
AppiumOptions capabilities = new AppiumOptions();
capabilities.AddAdditionalCapability("browserstack.deviceLogs", "false");
$caps = array(
    "browserstack.deviceLogs" => "false"
)
desired_cap = {
	'browserstack.deviceLogs' : 'false'
}
caps = Selenium::WebDriver::Remote::Capabilities.new
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 its capability as shown in the following code snippet:

Capability Description Expected values
appiumLogs Enable Appium logs A string. Defaults to true. Set to false to disable Appium logs.
DesiredCapabilities capabilities = new DesiredCapabilities();
HashMap<String, Object> browserstackOptions = new HashMap<String, Object>();
browserstackOptions.put("appiumLogs", "false");
capabilities.setCapability("bstack:options", browserstackOptions);
var capabilities = {
	'bstack:options' : {
		"appiumLogs" : "false",
	}
}
AppiumOptions capabilities = new AppiumOptions();
Dictionary<string, object> browserstackOptions = new Dictionary<string, object>();
browserstackOptions.Add("appiumLogs", "false");
capabilities.AddAdditionalCapability("bstack:options", browserstackOptions);
$caps = array(
	'bstack:options' => array(
		"appiumLogs" => "false",
	),
)
desired_cap = {
	'bstack:options' : {
		"appiumLogs" : "false",
	},
}
capabilities = {
	'bstack:options' => {
		"appiumLogs" => "false",
	},
}
Capability Description Expected values
browserstack.appiumLogs Enable Appium logs A string. Defaults to true. Set to false to disable Appium logs.
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("browserstack.appiumLogs", "false");
var capabilities = {
	"browserstack.appiumLogs" : "false",
}
AppiumOptions capabilities = new AppiumOptions();
capabilities.AddAdditionalCapability("browserstack.appiumLogs", "false");
$caps = array(
"browserstack.appiumLogs" => "false"
)
desired_cap = {
	'browserstack.appiumLogs': 'false'
}
caps = Selenium::WebDriver::Remote::Capabilities.new
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 its capability as shown in the following code snippet:

Capability Description Expected values
debug Enable visual logs A string. Defaults to false

true if you want to enable the visual logs. false otherwise.
DesiredCapabilities capabilities = new DesiredCapabilities();
HashMap<String, Object> browserstackOptions = new HashMap<String, Object>();
browserstackOptions.put("debug", "true");
capabilities.setCapability("bstack:options", browserstackOptions);
var capabilities = {
	'bstack:options' : {
		"debug" : "true",
	}
}
AppiumOptions capabilities = new AppiumOptions();
Dictionary<string, object> browserstackOptions = new Dictionary<string, object>();
browserstackOptions.Add("debug", "true");
capabilities.AddAdditionalCapability("bstack:options", browserstackOptions);
$caps = array(
	'bstack:options' => array(
		"debug" => "true",
	),
)
desired_cap = {
	'bstack:options' : {
		"debug" : "true",
	},
}
capabilities = {
	'bstack:options' => {
		"debug" => "true",
	},
}
Capability Description Expected values
browserstack.debug Enable visual logs A string. Defaults to false

true if you want to enable the visual logs. false otherwise.
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
capabilities.setCapability("browserstack.debug", "true");
var capabilities = {
	'browserstack.debug': 'true'
}
AppiumOptions capabilities = new AppiumOptions();
capabilities.AddAdditionalCapability("browserstack.debug", "true");
$caps = array(
"browserstack.debug" => "true"
)
desired_cap = {
	'browserstack.debug': 'true'
}
caps = Selenium::WebDriver::Remote::Capabilities.new
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. To disable video logs use its capability as shown in the following code snippet:

Capability Description Expected values
video Enable video recording A string. Defaults to true

true if you want to enable the video recording. false otherwise.
DesiredCapabilities capabilities = new DesiredCapabilities();
HashMap<String, Object> browserstackOptions = new HashMap<String, Object>();
browserstackOptions.put("video", "false");
capabilities.setCapability("bstack:options", browserstackOptions);
var capabilities = {
	'bstack:options' : {
		"video" : "false",
	},
}
AppiumOptions capabilities = new AppiumOptions();
Dictionary<string, object> browserstackOptions = new Dictionary<string, object>();
browserstackOptions.Add("video", "false");
capabilities.setCapability("bstack:options", browserstackOptions);
$caps = array(
	'bstack:options' => array(
		"video" => "false",
	),
)
desired_cap = {
	'bstack:options' : {
		"video" : "false",
	},
}
capabilities = {
	'bstack:options' => {
		"video" => "false",
	},
}
Capability Description Expected values
browserstack.video Enable video recording A string. Defaults to true

true if you want to enable the video recording. false otherwise.
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("browserstack.video", "false");
var capabilities = {
	'browserstack.video': 'false'
}
AppiumOptions capabilities = new AppiumOptions();
capabilities.AddAdditionalCapability("browserstack.video", "false");
$caps = array(
"browserstack.video" => "false"
)
desired_cap = {
	'browserstack.video': 'false'
}
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["browserstack.video"] = "false"

Your video recordings are retained on BrowserStack for 30 days from the day of test execution. All other test execution data, including screenshots and logs, are retained on BrowserStack for 60 days from the day of test execution.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle