Set debugging options
On BrowserStack, you can troubleshoot your failed tests using a variety of debugging tools.
Text logs
Text logs are a comprehensive record of your tests. 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.
You don’t need to set any capability for text logs, as these 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.
desired_caps = {
'browserstack.networkLogs': 'true'
}
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("browserstack.networkLogs", "true");
desired_cap = {
'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");
Device logs
Device logs are system logs specific to your application and tests generated by iOS or Android. They can help you troubleshoot any errors if your test has failed.
Device logs are enabled by default. To disable device logs, use the browserstack.deviceLogs
capability.
desired_caps = {
'browserstack.deviceLogs': 'false'
}
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("browserstack.deviceLogs", "false");
desired_cap = {
'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");
Appium logs
Appium logs are generated by the Appium server and contain detailed record of your appium test execution. 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.
desired_caps = {
'browserstack.appiumLogs': 'false'
}
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("browserstack.appiumLogs", "false");
desired_cap = {
'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");
Visual logs
Visual Logs enables you to automatically capture screenshots for various Appium commands executed in your tests. They can help find the exact step and the page 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.
desired_caps = {
'browserstack.debug': 'true'
}
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("browserstack.debug", "true");
desired_cap = {
'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");
Video recording
Every test run on the BrowserStack is recorded exactly as it is executed on our remote machine. 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.
desired_caps = {
'browserstack.video': 'false'
}
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("browserstack.video", "false");
desired_cap = {
'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");
Note: Your test execution data, including videos, screenshots, and logs, are retained on BrowserStack for 60 days from 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
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!