AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

react-native-tv-best-practices

Reviews React Native TV apps for focus/D-pad navigation, 10-foot UI layout, TV playback/DRM integration, low-memory TV performance, and TV accessibility. Use when building, debugging, or reviewing react-native-tvos, Expo TV, Amazon Vega/Kepler, or React Native web TV targets where the issue depends on remote input, TV focus, TV packaging, TV hardware, or TV playback constraints.

Original source
callstackincubator
License
MIT
Pinned revision
59e9d17446a248b21d86f078fcd0bd2d36db1ca4

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read callstackincubator--react-native-tv-best-practices at revision 59e9d17446a248b21d86f078fcd0bd2d36db1ca4, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 28

references/test-e2e.md


title: End-to-End Testing for TV Apps impact: MEDIUM tags: e2e, appium, webdriverio, device-farms, tvos, android-tv

End-to-End Testing for TV Apps

For full behavioral testing, Appium is the best option for React Native TV. It supports Android TV and Apple TV via UIAutomator and XCUITest. Web-based platforms test through browser automation.

Quick Reference

  • Use Appium + WebdriverIO for native TV platforms
  • Use driver.pressKeyCode to simulate D-pad navigation
  • Use accessibility labels as selectors (~home-button)
  • Device farms (AWS, BrowserStack, Sauce Labs) for real hardware testing

Appium Setup — Android TV

// wdio.conf.ts
capabilities: [{
  platformName: 'Android',
  automationName: 'UiAutomator2',
  deviceName: 'Android TV Emulator',
  appPackage: 'com.mycompany.tvapp',
  appActivity: 'com.mycompany.tvapp.MainActivity',
  newCommandTimeout: 300,
}]

Appium Setup — Apple TV

capabilities: [{
  platformName: 'iOS',
  platformVersion: '17.0',
  deviceName: 'Apple TV',
  automationName: 'XCUITest',
  udid: 'auto',
  app: '/path/to/your/TVApp.app',
  newCommandTimeout: 300,
}]

Example Test

describe('TV App Navigation', () => {
  it('navigates to Home and selects an item', async () => {
    const homeButton = await $('~home-button');
    await homeButton.click();
    await driver.pressKeyCode(20); // DPAD_DOWN
    await driver.pressKeyCode(23); // DPAD_CENTER
    const detailsSection = await $('~details-section');
    await expect(detailsSection).toBeDisplayed();
  });
});

Make components accessible for selectors:

<Pressable accessibilityLabel="home-button" onPress={goHome}>
  <Text>Home</Text>
</Pressable>

Web-Based TV Platforms (Tizen, webOS)

Use WebdriverIO with browser capabilities:

capabilities: [{
  browserName: 'chrome',
  'goog:chromeOptions': {
    args: ['--window-size=1920,1080'],
  },
}],
services: ['chromedriver'],
describe('Web TV App (webOS)', () => {
  it('navigates with keyboard and selects item', async () => {
    await browser.url('http://localhost:1234/index.html');
    const homeButton = await $('aria/Home');
    await homeButton.click();
    await browser.keys(['ArrowDown', 'Enter']);
    const details = await $('[data-testid="details"]');
    await expect(details).toBeDisplayed();
  });
});

Device Farms

Real-device testing is essential — emulators can't replicate remote input, performance, or display quirks.

| Service | Supported | Integration | |---------|-----------|-------------| | AWS Device Farm | Android, iOS, custom | Upload APK/IPA, use ARN refs | | BrowserStack | Android, iOS, web | bs:// app IDs, wdio service | | Sauce Labs | Android, iOS, web | storage: app refs |

Running on Device Farms

  1. Upload binary (APK/IPA) via API
  2. Get app ID (ARN, bs://, storage:)
  3. Update capabilities with real device names
  4. Run: npx wdio run wdio.browserstack.conf.ts

AWS Device Farm

aws devicefarm schedule-run \
  --project-arn arn:... \
  --app-arn arn:... \
  --device-pool-arn arn:... \
  --name "MyApp TV Run" \
  --test type=APPIUM_NODE,testPackageArn=arn:...

Limitations

  • Maestro and Detox are not helpful for TV environments
  • Web-based TVs run custom browser forks — never exact match in automated tests
  • For platform-specific quirks, real devices are the only reliable test

Related Skills