Open app - operation

Install and open the application on the device.


To perform this operation in the Suitest Test editor use the Open App line:

Open application at the default screen
Open application at the default screen

To perform this operation in the Suitest JavaScript API use the openApp command:

await suitest.openApp();

Platform specifics

The behavior of Open app varies across platforms:

On HbbTV / Freeview Play, Android TV, Xbox One, LG webOS and Websites the application is opened automatically. Additionally for Android TV, Xbox One and LG webOS Suitest checks the version of the app currently installed on device and installs correct version as necessary.

Sometimes installing an app may take longer time, especially if the package size is bigger. So just be patient ...

On Samsung Tizen, Samsung Orsay and a few other platforms Suitest cannot currently install nor open the app automatically. You will need to either override the Open App command or open the application manually every time you start the test.

Overriding Open App operation

Suitest allows to override the Open App operation by specifying a test to be executed instead. You can define the Open App override on the configuration level.

Configuring Open app override
Configuring Open app override

The override test should contain steps that would eventually lead to opening the application on the target device. In the override test you are limited to Press button (except the conditional modifiers), Sleep and Poll URL operations.

Manual Open app

On platforms where automated app opening is not supported, Suitest will by default pause the execution and notify the test operator to install and open the application manually. The rest of the test will complete automatically.

Test Editor's notification to manually open application. After you've done this, the message will change to *"App is ready"* and the *Continue* button will be enabled. Press the *Continue* button to run the rest of the test automatically.
Test Editor's notification to manually open application. After you've done this, the message will change to "App is ready" and the Continue button will be enabled. Press the Continue button to run the rest of the test automatically.

On platforms that do not support automatic app opening:

  • Open App line in the Test Editor will only work if it is the first line in the test.

  • openApp() API method will throw an exception.

Automating Open App

There are several ways how to automate your Open App operation:

Doing it with "Press button"

In many situations, you will be able to perform a stable sequence of key presses that will eventually open the application. For example, on the Samsung Orsay, applications are arranged in a grid. To get to the grid, you need to press the Smart button (a special Samsung button on the remote), so the sequence of steps of opening an app that is listed in the top left corner of the grid would look like this:

Samsung Orsay Open app override only using *Press button*
Samsung Orsay Open app override only using Press button

You may need to make this sequence more robust so that it does not break, for example, when the device already has the Smart Hub open, to fix that add an exit to the beginning:

More robust Open app override
More robust Open app override

The first two lines make sure that if the Smart Hub ran, it would be closed before attempting to open our app again.

You may be required to cover several edge-cases. Be sure to add quality comments to every step of your sequence so that later on you will be able to understand what the purpose of every step was.

Doing it with Poll URL

Many device manufacturers have some sort of a Software Development Kit (SDK) for building apps for their platform. The SDK is usually able to install and open apps on the TV.

If you are familiar with such an SDK it is easy to create a web service that would trigger the SDK command for app installation.

Then, in your app override test use Poll URL operation to call the web service URL from the test and have the application open.

Not automating Open App

Depending on your use case, it may not be necessary to automate this line at all. Consider that you can still run your entire test suite automatically but you do need to trigger the execution manually.

You should create your test scenarios as you would under any other circumstances. Make them small and independent from one another, organize them neatly in folders and tag them with meaningful tags so that you have little maintenance work in the future.

When it comes to the scheduled test execution, concentrate on reducing the amount of times you are required to open an application on devices. To achieve this, create a master test and use Run test operation to run several tests sequentially.

Master test groups execution of 4 tests. Only one single manual action is required here
Master test groups execution of 4 tests. Only one single manual action is required here