Table of Contents

General information

The DTVKit HBBTV module is composed of the static library libhbbtv.a and the plug-in libnpapihbbtvplugin.so and is based on the HbbTV standard, version 1.2.1.

libhbbtv.a

This library contains the implementation of the HbbTV standard and interfaces directly with the different parts of the system via various API, defined in the corresponding header files:

Plugin

The plug-in implements the extension to the standard Javascript objects needed by the HbbTV applications using the NPAPI interface.

API Documentation

The online API for the latest version of HBBTV can be found here

Building

To build the HBBTV module it is first necessary to configure the environment, an example configuration script is provided (example_setenv.sh). Please ensure the correct value for the environment variables is exported, some of them might not be needed. Please read the comments in the example script for more information. Once the environment has been set up, compile by doing

make

in the root folder of the HBBTV module, this will compile both libhbbtv.a and the plugin. For the browser to be able to load the plug-in you will need to copy it in the proper location, which is browser specific. If you correctly set-up DTVKIT_HBBTV_PLUGIN_INSTALL_FOLDER, doing

make install-plugin

will copy the folder to the specified location.

Testing

Introduction

HBBTV in DTVKit is tested by substituting the normal DTVKit application with a specialised test application. The specialised test application: (1) isolates HBBTV from DVBCore by implementing its own, light DVB functionality, and (2) incorporates simulation functionality to facilitate the recording and playback of tests.

cd app/test/HBBTV
source setenv.sh
make

See 'app/example_setenv.sh' for an example build environment.

Record Tests

./hbbtvtestsimulator -m record -t testdirectory

When the test application is started with the record mode option, user actions are recorded in the test directory.

User Actions for Playback Validation

Playback Tests

./hbbtvtestsimualtor -m playback -t testdirectory -r resultfile.tap

When the test application is started with the playback mode option, user actions which were recorded in the test directory are played back. If any playback validation check fails, a fail is recorded in the result file, otherwise a pass is recorded; result files conform to the Test Anything Protocol (TAP) format.

Pre-recorded Tests

The 'mit-experts-testsuite' directory contains a number of tests (recordings), each of these tests automate the execution of a test in the MIT-xperts HbbTV-Testsuite. The MIT-xperts HbbTV-Testsuite is available from https://github.com/mitxp/HbbTV-Testsuite/wiki.

Portability

For the upcoming release of version 1.1, the tests were recorded on a system with Qt 4.8.1 and the Liberation font collection installed. A different system configuration could affect the application’s visual output, so could cause some or all of the pre-recorded tests to fail.