Simplify Smart TV Testing with Intuitive Automation Frameworks

Simplify Smart TV automation testing with real device access, robust automation tools, and detailed performance insights.
Samsung Tizen UI Automation Testing using Appium: A Comprehensive GuideSamsung Tizen UI Automation Testing using Appium: A Comprehensive Guide

Samsung Tizen UI Automation Testing using Appium: A Comprehensive Guide

October 30, 2023
 by 
Rohan SinghRohan Singh
Rohan Singh

Introduction

Ensuring a flawless user experience across various devices and platforms is paramount in automated testing. This becomes especially critical when testing applications for smart TVs like those running on Samsung's Tizen operating system. To streamline the testing process and guarantee a seamless experience for your TV app users, we explore how to harness the power of the latest Tizen Appium driver for Tizen UI automation testing offered by HeadSpin.

HeadSpin empowers the support of automated and manual testing for common AV (audio-visual) devices and smart TVs, including WebOS, TizenOS, AndroidTV, and Apple TV. In this blog, we'll delve into leveraging the test automation tool for Tizen— the Appium driver by HeadSpin— to test AV-enabled Tizen TVs.

Find more at: https://github.com/headspinio/appium-tizen-tv-driver/tree/main/packages/appium-tizen-tv-driver

Automation Testing of Samsung Tizen TV: Why Is It Necessary?

The surge in TV app development and the increasing variety of smart TV platforms necessitate robust testing methodologies. Tizen UI automation testing offers several advantages, including:

  1. Efficiency: Automation expedites the testing procedure, decreasing the time and energy needed for manual testing.
  2. Consistency: Automated tests provide consistent and repeatable results, eliminating human errors.
  3. Coverage: Automation allows for testing a wide range of scenarios, ensuring comprehensive coverage.
  4. Quick Feedback: Automated tests can quickly identify and report issues, facilitating timely bug fixes.

The Tizen Appium Driver: A Game Changer

The Tizen Appium driver by HeadSpin was meticulously crafted to eliminate the need to automate a mobile remote control, simplify the setup, and conduct TV tests. This driver seamlessly interacts with the device SDB (Samsung Debug Bridge) bridge, abstracting away the complexities and making it easier for testers to focus on what matters most - ensuring the quality of their TV applications.

Read more: Mastering Automation of Android TV Apps With Appium

Getting Started with Appium Capabilities

Appium is a widely used open-source automation testing framework that provides cross-platform support, making it ideal for Tizen, WebOS, Android, and Apple TV. It enables both automated and manual testing of common AV devices and TVs.

To kickstart your testing journey with the Appium for Tizen UI automation testing, you must first acquire the Appium capabilities.

appium tizen tv

Step 1: Obtain Appium Capabilities

  1. Go to the Automation Configuration section after clicking on the ellipsis next to the TV under test.
  2. If required, create an API key from the provided hyperlink.
  3. Copy the Web driver URL and capabilities to a new Python script with the Appium library imported.

Step 2: Create a Python Script

Here's a Python script snippet that demonstrates how to set up your Appium capabilities:

device configuration tizen tv

from appium import webdriver

caps = {
"platformName": "tizentv",
"appium:automationName": "tizentv",
"appium:deviceName": "087K3CTN7004332",
"appium:udid": "087K3CTN7004332",
"appium:appPackage": "biF5E2SN9M.AppiumHelper"
}

driver = webdriver.Remote("https://dev-us-pao-7.headspin.io:7303/v0/{api_token}/wd/hub", caps)

driver.execute_script('tizen: pressKey', {'key': 'KEY_HOME'})
driver.execute_script('tizen: pressKey', {'key': 'KEY_UP'})
driver.execute_script('tizen: pressKey', {'key': 'KEY_RETURN'})

Step 3: Automate Key Presses

With HeadSpin's installation of the Appium for Tizen TV apps, you can easily automate key presses using the execute_script capability of the Appium client. This allows you to interact with the TV as if you were using a remote control.

For instance, to simulate pressing the 'HOME' button on the remote, you can use the following code:


driver.execute_script('tizen: pressKey', {'key': 'KEY_HOME'})

The beauty of this approach is that it grants you the ability to control various aspects of the TV using key presses, just as a user would.

Refer to this: appium-tizen-tv-driver/packages/tizen-remote/lib/keys.js

at main · headspinio/appium-tizen-tv-driver (github.com)

List of Supported Remote Control Keys

Here is a comprehensive list of supported remote control keys that you can use to control various functionalities during Samsung Tizen smart TV testing:

  0: 'KEY_0',

  1: 'KEY_1',

  2: 'KEY_2',

  3: 'KEY_3',

  4: 'KEY_4',

  5: 'KEY_5',

  6: 'KEY_6',

  7: 'KEY_7',

  8: 'KEY_8',

  9: 'KEY_9',

  11: 'KEY_11',

  12: 'KEY_12',

  '16_9': 'KEY_16_9',

  '4_3': 'KEY_4_3',

  '3SPEED': 'KEY_3SPEED',

  AD: 'KEY_AD',

  ADDDEL: 'KEY_ADDDEL',

  ALT_MHP: 'KEY_ALT_MHP',

  ANGLE: 'KEY_ANGLE',

  ANTENA: 'KEY_ANTENA',

  ANYNET: 'KEY_ANYNET',

  ANYVIEW: 'KEY_ANYVIEW',

  APP_LIST: 'KEY_APP_LIST',

  ASPECT: 'KEY_ASPECT',

  AUTO_ARC_ANTENNA_AIR: 'KEY_AUTO_ARC_ANTENNA_AIR',

  AUTO_ARC_ANTENNA_CABLE: 'KEY_AUTO_ARC_ANTENNA_CABLE',

  AUTO_ARC_ANTENNA_SATELLITE: 'KEY_AUTO_ARC_ANTENNA_SATELLITE',

  AUTO_ARC_ANYNET_AUTO_START: 'KEY_AUTO_ARC_ANYNET_AUTO_START',

  AUTO_ARC_ANYNET_MODE_OK: 'KEY_AUTO_ARC_ANYNET_MODE_OK',

  AUTO_ARC_AUTOCOLOR_FAIL: 'KEY_AUTO_ARC_AUTOCOLOR_FAIL',

  AUTO_ARC_AUTOCOLOR_SUCCESS: 'KEY_AUTO_ARC_AUTOCOLOR_SUCCESS',

  AUTO_ARC_C_FORCE_AGING: 'KEY_AUTO_ARC_C_FORCE_AGING',

  AUTO_ARC_CAPTION_ENG: 'KEY_AUTO_ARC_CAPTION_ENG',

  AUTO_ARC_CAPTION_KOR: 'KEY_AUTO_ARC_CAPTION_KOR',

  AUTO_ARC_CAPTION_OFF: 'KEY_AUTO_ARC_CAPTION_OFF',

  AUTO_ARC_CAPTION_ON: 'KEY_AUTO_ARC_CAPTION_ON',

  AUTO_ARC_JACK_IDENT: 'KEY_AUTO_ARC_JACK_IDENT',

  AUTO_ARC_LNA_OFF: 'KEY_AUTO_ARC_LNA_OFF',

  AUTO_ARC_LNA_ON: 'KEY_AUTO_ARC_LNA_ON',

  AUTO_ARC_PIP_CH_CHANGE: 'KEY_AUTO_ARC_PIP_CH_CHANGE',

  AUTO_ARC_PIP_DOUBLE: 'KEY_AUTO_ARC_PIP_DOUBLE',

  AUTO_ARC_PIP_LARGE: 'KEY_AUTO_ARC_PIP_LARGE',

  AUTO_ARC_PIP_LEFT_BOTTOM: 'KEY_AUTO_ARC_PIP_LEFT_BOTTOM',

  AUTO_ARC_PIP_LEFT_TOP: 'KEY_AUTO_ARC_PIP_LEFT_TOP',

  AUTO_ARC_PIP_RIGHT_BOTTOM: 'KEY_AUTO_ARC_PIP_RIGHT_BOTTOM',

  AUTO_ARC_PIP_RIGHT_TOP: 'KEY_AUTO_ARC_PIP_RIGHT_TOP',

  AUTO_ARC_PIP_SMALL: 'KEY_AUTO_ARC_PIP_SMALL',

  AUTO_ARC_PIP_SOURCE_CHANGE: 'KEY_AUTO_ARC_PIP_SOURCE_CHANGE',

  AUTO_ARC_PIP_WIDE: 'KEY_AUTO_ARC_PIP_WIDE',

  AUTO_ARC_RESET: 'KEY_AUTO_ARC_RESET',

  AUTO_ARC_USBJACK_INSPECT: 'KEY_AUTO_ARC_USBJACK_INSPECT',

  AUTO_FORMAT: 'KEY_AUTO_FORMAT',

  AUTO_PROGRAM: 'KEY_AUTO_PROGRAM',

  AV1: 'KEY_AV1',

  AV2: 'KEY_AV2',

  AV3: 'KEY_AV3',

  BACK_MHP: 'KEY_BACK_MHP',

  BOOKMARK: 'KEY_BOOKMARK',

  CALLER_ID: 'KEY_CALLER_ID',

  CAPTION: 'KEY_CAPTION',

  CATV_MODE: 'KEY_CATV_MODE',

  CH_LIST: 'KEY_CH_LIST',

  CHDOWN: 'KEY_CHDOWN',

  CHUP: 'KEY_CHUP',

  CLEAR: 'KEY_CLEAR',

  CLOCK_DISPLAY: 'KEY_CLOCK_DISPLAY',

  COMPONENT1: 'KEY_COMPONENT1',

  COMPONENT2: 'KEY_COMPONENT2',

  CONTENTS: 'KEY_CONTENTS',

  CONVERGENCE: 'KEY_CONVERGENCE',

  CONVERT_AUDIO_MAINSUB: 'KEY_CONVERT_AUDIO_MAINSUB',

  CUSTOM: 'KEY_CUSTOM',

  CYAN: 'KEY_CYAN',

  DEVICE_CONNECT: 'KEY_DEVICE_CONNECT',

  DISC_MENU: 'KEY_DISC_MENU',

  DMA: 'KEY_DMA',

  DNET: 'KEY_DNET',

  DNIe: 'KEY_DNIe',

  DNSe: 'KEY_DNSe',

  DOOR: 'KEY_DOOR',

  DOWN: 'KEY_DOWN',

  DSS_MODE: 'KEY_DSS_MODE',

  DTV: 'KEY_DTV',

  DTV_LINK: 'KEY_DTV_LINK',

  DTV_SIGNAL: 'KEY_DTV_SIGNAL',

  DVD_MODE: 'KEY_DVD_MODE',

  DVI: 'KEY_DVI',

  DVR: 'KEY_DVR',

  DVR_MENU: 'KEY_DVR_MENU',

  DYNAMIC: 'KEY_DYNAMIC',

  ENTER: 'KEY_ENTER',

  ENTERTAINMENT: 'KEY_ENTERTAINMENT',

  ESAVING: 'KEY_ESAVING',

  EXIT: 'KEY_EXIT',

  EXT1: 'KEY_EXT1',

  EXT10: 'KEY_EXT10',

  EXT11: 'KEY_EXT11',

  EXT12: 'KEY_EXT12',

  EXT13: 'KEY_EXT13',

  EXT14: 'KEY_EXT14',

  EXT15: 'KEY_EXT15',

  EXT16: 'KEY_EXT16',

  EXT17: 'KEY_EXT17',

  EXT18: 'KEY_EXT18',

  EXT19: 'KEY_EXT19',

  EXT2: 'KEY_EXT2',

  EXT20: 'KEY_EXT20',

  EXT21: 'KEY_EXT21',

  EXT22: 'KEY_EXT22',

  EXT23: 'KEY_EXT23',

  EXT24: 'KEY_EXT24',

  EXT25: 'KEY_EXT25',

  EXT26: 'KEY_EXT26',

  EXT27: 'KEY_EXT27',

  EXT28: 'KEY_EXT28',

  EXT29: 'KEY_EXT29',

  EXT3: 'KEY_EXT3',

  EXT30: 'KEY_EXT30',

  EXT31: 'KEY_EXT31',

  EXT32: 'KEY_EXT32',

  EXT33: 'KEY_EXT33',

  EXT34: 'KEY_EXT34',

  EXT35: 'KEY_EXT35',

  EXT36: 'KEY_EXT36',

  EXT37: 'KEY_EXT37',

  EXT38: 'KEY_EXT38',

  EXT39: 'KEY_EXT39',

  EXT4: 'KEY_EXT4',

  EXT40: 'KEY_EXT40',

  EXT41: 'KEY_EXT41',

  EXT5: 'KEY_EXT5',

  EXT6: 'KEY_EXT6',

  EXT7: 'KEY_EXT7',

  EXT8: 'KEY_EXT8',

  EXT9: 'KEY_EXT9',

  FACTORY: 'KEY_FACTORY',

  FAVCH: 'KEY_FAVCH',

  FF: 'KEY_FF',

  FF_: 'KEY_FF_',

  FM_RADIO: 'KEY_FM_RADIO',

  GAME: 'KEY_GAME',

  GREEN: 'KEY_GREEN',

  GUIDE: 'KEY_GUIDE',

  HDMI: 'KEY_HDMI',

  HDMI1: 'KEY_HDMI1',

  HDMI2: 'KEY_HDMI2',

  HDMI3: 'KEY_HDMI3',

  HDMI4: 'KEY_HDMI4',

  HELP: 'KEY_HELP',

  HOME: 'KEY_HOME',

  ID_INPUT: 'KEY_ID_INPUT',

  ID_SETUP: 'KEY_ID_SETUP',

  INFO: 'KEY_INFO',

  INSTANT_REPLAY: 'KEY_INSTANT_REPLAY',

  LEFT: 'KEY_LEFT',

  LINK: 'KEY_LINK',

  LIVE: 'KEY_LIVE',

  MAGIC_BRIGHT: 'KEY_MAGIC_BRIGHT',

  MAGIC_CHANNEL: 'KEY_MAGIC_CHANNEL',

  MDC: 'KEY_MDC',

  MENU: 'KEY_MENU',

  MIC: 'KEY_MIC',

  MORE: 'KEY_MORE',

  MOVIE1: 'KEY_MOVIE1',

  MS: 'KEY_MS',

  MTS: 'KEY_MTS',

  MUTE: 'KEY_MUTE',

  NINE_SEPERATE: 'KEY_NINE_SEPERATE',

  OPEN: 'KEY_OPEN',

  PANNEL_CHDOWN: 'KEY_PANNEL_CHDOWN',

  PANNEL_CHUP: 'KEY_PANNEL_CHUP',

  PANNEL_ENTER: 'KEY_PANNEL_ENTER',

  PANNEL_MENU: 'KEY_PANNEL_MENU',

  PANNEL_POWER: 'KEY_PANNEL_POWER',

  PANNEL_SOURCE: 'KEY_PANNEL_SOURCE',

  PANNEL_VOLDOW: 'KEY_PANNEL_VOLDOW',

  PANNEL_VOLUP: 'KEY_PANNEL_VOLUP',

  PANORAMA: 'KEY_PANORAMA',

  PAUSE: 'KEY_PAUSE',

  PCMODE: 'KEY_PCMODE',

  PERPECT_FOCUS: 'KEY_PERPECT_FOCUS',

  PICTURE_SIZE: 'KEY_PICTURE_SIZE',

  PIP_CHDOWN: 'KEY_PIP_CHDOWN',

  PIP_CHUP: 'KEY_PIP_CHUP',

  PIP_ONOFF: 'KEY_PIP_ONOFF',

  PIP_SCAN: 'KEY_PIP_SCAN',

  PIP_SIZE: 'KEY_PIP_SIZE',

  PIP_SWAP: 'KEY_PIP_SWAP',

  PLAY: 'KEY_PLAY',

  PLUS100: 'KEY_PLUS100',

  PMODE: 'KEY_PMODE',

  POWER: 'KEY_POWER',

  POWEROFF: 'KEY_POWEROFF',

  POWERON: 'KEY_POWERON',

  PRECH: 'KEY_PRECH',

  PRINT: 'KEY_PRINT',

  PROGRAM: 'KEY_PROGRAM',

  QUICK_REPLAY: 'KEY_QUICK_REPLAY',

  REC: 'KEY_REC',

  RED: 'KEY_RED',

  REPEAT: 'KEY_REPEAT',

  RESERVED1: 'KEY_RESERVED1',

  RETURN: 'KEY_RETURN',

  REWIND: 'KEY_REWIND',

  REWIND_: 'KEY_REWIND_',

  RIGHT: 'KEY_RIGHT',

  RSS: 'KEY_RSS',

  RSURF: 'KEY_RSURF',

  SCALE: 'KEY_SCALE',

  SEFFECT: 'KEY_SEFFECT',

  SETUP_CLOCK_TIMER: 'KEY_SETUP_CLOCK_TIMER',

  SLEEP: 'KEY_SLEEP',

  SOURCE: 'KEY_SOURCE',

  SRS: 'KEY_SRS',

  STANDARD: 'KEY_STANDARD',

  STB_MODE: 'KEY_STB_MODE',

  STILL_PICTURE: 'KEY_STILL_PICTURE',

  STOP: 'KEY_STOP',

  SUB_TITLE: 'KEY_SUB_TITLE',

  SVIDEO1: 'KEY_SVIDEO1',

  SVIDEO2: 'KEY_SVIDEO2',

  SVIDEO3: 'KEY_SVIDEO3',

  TOOLS: 'KEY_TOOLS',

  TOPMENU: 'KEY_TOPMENU',

  TTX_MIX: 'KEY_TTX_MIX',

  TTX_SUBFACE: 'KEY_TTX_SUBFACE',

  TURBO: 'KEY_TURBO',

  TV: 'KEY_TV',

  TV_MODE: 'KEY_TV_MODE',

  UP: 'KEY_UP',

  VCHIP: 'KEY_VCHIP',

  VCR_MODE: 'KEY_VCR_MODE',

  VOLDOWN: 'KEY_VOLDOWN',

  VOLUP: 'KEY_VOLUP',

  W_LINK: 'KEY_W_LINK',

  WHEEL_LEFT: 'KEY_WHEEL_LEFT',

  WHEEL_RIGHT: 'KEY_WHEEL_RIGHT',

  YELLOW: 'KEY_YELLOW',

  ZOOM_IN: 'KEY_ZOOM_IN',

  ZOOM_MOVE: 'KEY_ZOOM_MOVE',

  ZOOM_OUT: 'KEY_ZOOM_OUT',

  ZOOM1: 'KEY_ZOOM1',

  ZOOM2: 'KEY_ZOOM2'

These keys offer precise control over the TV's functionalities, allowing for thorough testing.

Also read: Using Appium for Automated Testing of Roku TV Apps

Conclusion

With Appium for Tizen UI automation testing and leveraging the capabilities of the HeadSpin AV box, numerous global video streaming companies have managed to ensure a perfect and flawless experience for their TV app users.

Are you ready to enhance your Tizen Smart TV test automation? Discover how the Tizen Appium driver by HeadSpin can elevate your automation testing process and guarantee an impeccable user experience for your Tizen TV applications.

Connect now

FAQs

Q1. Can I interact with my apps using JavaScript when conducting tests with Appium?

Ans: When performing tests with Appium, you can interact with your apps using JavaScript. As you execute commands through Appium, the server will transmit the script to the app, encapsulating it within an anonymous function to be completed. This flexibility enables you to seamlessly interact with and test your applications using JavaScript during testing

Q2. What is TV automation software?

Ans: TV automation software is an essential tool for efficiently overseeing a television station's scheduling and video stream. This specialized software, integrated with acquisition and playback cards, facilitates the reception and transmission of signals, ensuring seamless and automated control of television operations.

Share this

Samsung Tizen UI Automation Testing using Appium: A Comprehensive Guide

4 Parts