Skip to main content
No Result Found
Connect and get help from 7,000+ developers on our Discord community. Ask the CommunityAsk the Community

Extended sessions for Smart TV tests

Run Smart TV test sessions beyond the 2-hour default, up to 10 hours across Android TV, Apple TV, and Roku TV on BrowserStack App Automate.

BrowserStack App Automate supports extended test sessions on Smart TV platforms, letting sessions run up to 10 hours instead of the standard 2-hour limit. Use it for long-running scenarios such as video playback, soak tests, and overnight QA runs that don’t fit in a standard session.

Apple TV extended sessions work for both DRM and non-DRM content. For DRM-protected apps, sessions running close to 8 hours may experience video issues. All other Apple TV scenarios and all Android TV and Roku TV scenarios are unaffected.

Prerequisites

Extended sessions require a one-time setup by the BrowserStack support team. Your account group’s session-duration limit must be raised before the capability in your script takes effect.

If your test scripts include long idle stretches, ask the BrowserStack support team to raise the idle timeout for your group at the same time.

Enable extended sessions

Once the BrowserStack support team has raised your group’s session-duration limit, pass extendedTimeLimit inside bstack:options in your test script:

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "<platform-name>");
capabilities.setCapability("platformVersion", "<version>");
capabilities.setCapability("deviceName", "<device-name>");
capabilities.setCapability("app", "<app-url>");
capabilities.setCapability("automationName", "<automation-name>");

HashMap<String, Object> bstackOptions = new HashMap<String, Object>();
bstackOptions.put("extendedTimeLimit", "true");
bstackOptions.put("projectName", "<project-name>");
bstackOptions.put("buildName", "<build-name>");
bstackOptions.put("sessionName", "<session-name>");
bstackOptions.put("dedicatedDevice", "true");
bstackOptions.put("deviceId", "<device-id>");
capabilities.setCapability("bstack:options", bstackOptions);
let capabilities = {
  platformName: "<platform-name>",
  platformVersion: "<version>",
  deviceName: "<device-name>",
  app: "<app-url>",
  automationName: "<automation-name>",
  "bstack:options": {
    extendedTimeLimit: "true",
    projectName: "<project-name>",
    buildName: "<build-name>",
    sessionName: "<session-name>",
    dedicatedDevice: "true",
    deviceId: "<device-id>",
  },
};
desired_cap = {
    'platformName': '<platform-name>',
    'platformVersion': '<version>',
    'deviceName': '<device-name>',
    'app': '<app-url>',
    'automationName': '<automation-name>',
    'bstack:options': {
        'extendedTimeLimit': 'true',
        'projectName': '<project-name>',
        'buildName': '<build-name>',
        'sessionName': '<session-name>',
        'dedicatedDevice': 'true'
    },
}
caps = {
  "platformName" => "<platform-name>",
  "platformVersion" => "<version>",
  "deviceName" => "<device-name>",
  "app" => "<app-url>",
  "automationName" => "<automation-name>",
  "bstack:options" => {
    "extendedTimeLimit" => "true",
    "projectName" => "<project-name>",
    "buildName" => "<build-name>",
    "sessionName" => "<session-name>",
    "dedicatedDevice" => "true",
    "deviceId" => "<device-id>",
  },
}

Sessions are terminated when they remain idle for too long. For long-running tests, send periodic low-impact interactions, such as a directional key press every 30 to 40 seconds, to keep the session classified as active.

Platform support

The following table shows the maximum validated session duration for each Smart TV platform:

Platform Validated duration Maximum supported Notes
Android TV (Nvidia Shield, Amazon Fire TV) 10 hours 10 hours All scenarios behave normally.
Apple TV 10 hours 10 hours All scenarios work normally. For DRM-protected apps, sessions close to 8 hours may experience video issues. For more information, see the limitations section.
Roku TV 10 hours 10 hours All scenarios behave normally.

Limitations

  • 10-hour ceiling across all platforms. Sessions can’t be configured beyond 10 hours on any Smart TV platform.
  • Apple TV DRM video issues near 8 hours. For DRM-protected Apple TV apps, sessions running close to 8 hours may experience video issues. All other scenarios are unaffected.
  • Idle timeout. Sessions with long quiet periods will be terminated unless your script sends periodic keep-alive interactions.
  • BrowserStack support team activation required. Every account group needs a BrowserStack support team request before the capability takes effect.

Frequently asked questions

Up to 10 hours on every supported Smart TV platform: Android TV, Apple TV, and Roku TV. The cap is uniform across platforms and is set by the BrowserStack support team for your account group.

Not fully. Your group’s session-duration limit must be raised by the BrowserStack support team first. Once that’s done, you enable it per-script via extendedTimeLimit: "true" in bstack:options.

Extended sessions work on Apple TV for both DRM and non-DRM content. However, for DRM-protected apps, sessions running close to 8 hours may experience video issues. If your Apple TV test suite relies on DRM content and you plan to run sessions near the 8-hour mark, contact BrowserStack support before relying on extended sessions for that path.

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