top

PreTest Tool

Published 2014-10-28 | (Compatible with SDK 5.0,5.1 and 2014 models)

A guide for Smart TV apps pre testing tool

Description

The PreTest Tool is an automation tool that performs pre-testing of applications submitted by the developers in the SamsungDForum and provides a detailed result of some of the commonly occurring defects along with the guidelines and possible solutions. If there is not any error found by the PreTest Tool, the app would get submitted to the SamsungDForum for testing and certification process by Samsung. This would significantly reduce the total time involved in certifying an app.

Prerequisites

To use the PreTest Tool, your SmartTV App should be developed in JavaScript and packaged inside a zip file. The development guide for SmartTV App can be found in the below link:

http://developer.samsung.com/tv/develop/legacy-platform-library/ovw001/index

For uploading your SmartTV App in SamsungDForum, you need to have a Samsung account.

Scope

  1. The tool tests App Framework and JavaScript based applications.

  2. Following cases are handled by the tool:

    • Stop API in onUnload() function - Stop API should be included in onUnload() function. If your application uses the Player Plugin for video or audio playback, you must call the Player Stop operation when the application is shut down. Without this, the Player Plugin may not be terminated correctly and may generate errors. For more details, please refer the below link: http://developer.samsung.com/tv/develop/legacy-platform-library/tec00123/index

    • setOffScreensaver() while playing video - During video playback, screensaver should be off. In the Samsung TVs and BD Players, if there is no input to TV for a specified time, the screensaver is launched automatically. This might be strongly inconvenient in applications that play videos or image slideshow and developer should turn off this feature during that time. For more details, please refer the below link http://developer.samsung.com/tv/develop/legacy-platform-library/tec00115/index

    • Network error - The CheckPhysicalConnection() function checks the cable connection (wired connection) or the connection to an access point (wireless connection).

    • SetSystemMute handling - In case you are implementing your own custom volume control for your application, you have to keep in mind a set of rules when developing the mute functions which are give in the below link: http://developer.samsung.com/tv/develop/legacy-platform-library/tec00126/index

    • Source Key handling - Registering Source key is not recommended in SmartTV Apps.

    • SetDisplayArea() error - Area using SetDisplayArea() should be smaller than app’s resolution (960*540). Player area error - parameters of the SetDisplayArea() function need to be scaled down to basic app resolution (960x540). http://developer.samsung.com/tv/develop/legacy-platform-library/c07/index

    • Key Register/Unregister - All keys registered in the app should be unregistered before closing the app.

    • Smart Hub Key handling - Smart Hub key should not be registered inside the app. It’s default functionality should not be changed.

    • Player exception handling - Player exception handling event should be handled in the application as in the given link, to avoid unexpected behavior. http://developer.samsung.com/tv/develop/legacy-platform-library/tec00121/index

    • Volume OSD handling - In case of BD, app can’t use app’s Volume OSD. Below are links to guide for using the native Volume OSD provided by Samsung platform. http://developer.samsung.com/tv/develop/legacy-platform-library/tec00107/index http://developer.samsung.com/tv/develop/legacy-platform-library/tec00105/index

    • File case sensitive error - There should not be any case sensitive issue in the names of files or images in case of BD apps.

    • Key Press/Release event - Key Release event should not be used alone in the application. It should be used along with Key Press event.

    • Media Source handling - When Ticker app becomes full browsing, the source should be changed to Media and when it returns back to ticker mode, the source should be changed to TV.

    • CSS error - There should not be whitespace between value and unit in CSS code.

    • iframe error - iframe tag should be used from 2012 devices onwards.

    • IME error - Input Method Editor (IME) should be handled properly to enable text input in applications. For using IME, 1) IME Object should be created and 2) setQwertypos() & setKeyset() should be included. The following tutorial link demonstrates how to enable text input: how to create a basic application, and how to add the IME feature to the application for entering text in the input boxes, how to control the IME functions provided by the IME common module. http://developer.samsung.com/tv/develop/legacy-platform-library/tut00049/index

    • Return Key handling error - The Return key should take back to the previous application level. Only when the main screen is reached, it should close the application completely and open the Smart Hub window.

      http://developer.samsung.com/tv/develop/legacy-platform-library/tec00101/index

    • Exit key handling - On Exit key is pressed - App should go out to TV Source (RF Signal) and in case of Game or Video app, Exit Popup is essential.

      http://developer.samsung.com/tv/develop/legacy-platform-library/tec00101/index

    • Reserved KeyWord Handling - If there is a folder/file named manager in the application, the app can’t run as it is a keyword and can’t be used for any folder of file.

  3. The tool provides guidelines for the defects and suggests possible solutions.

Limitations

  • If there are more than one index.html file in an app, tool shows result according to index.html found at the root level.
  • Tool is able to provide results only for files not added dynamically.
  • Tool does not support dynamically loading applications. Such apps are also not applicable as per Samsung guidelines.
  • Tool does not support 3rd party frameworks functions declaration or binding.
  • Conditional check like (if { ... } else { ... }) for any API/pattern call are not validated by tool.
  • Return Key/Exit key error handling in case of manipulation of content using script is not supported.

PreTest Tool Plug-in For SmartTV Eclipse SDK

The PreTest tool plug-in, when integrated with Eclipse, provides another way of testing applications and provides detailed result in a separate view. Following are the steps to test an App using the SmartTV Eclipse SDK plug-in:

Figure 1 Right click on the App to be tested. Under Pretest Tool, select Run.

Figure 2 Detailed testing result would be displayed in “PreTest View” in the form of a tree structure.

Figure 3 Double click on each errors and details and you would be able to see more details as shown in below pictures

Figure 4 Double click on each errors and details and you would be able to see more details as shown in below pictures

Figure 5 Double click on each errors and details and you would be able to see more details as shown in below pictures

Figure 6 Double click on each errors and details and you would be able to see more details as shown in below pictures

Figure 7 Double click on each errors and details and you would be able to see more details as shown in below pictures

Creating your own TV application / Implementation details

To start with developing your Samsung SmartTV App, you can go through the articles given in: