Hey, are you wondering how to test the Roku application for Roku development?
Then, you are in the right place.
To deliver high-quality user-experiences on Roku, and to keep up their market share of household streaming devices in the U.S., the Roku developers continuously test their Roku applications.
But, how they do the testing? That’s the question which rings in our heads more often.
Let’s just find the answer together!
What are the requirements for testing the Roku application?
As part of the SMART TV App development, we need to keep an eye on the following things:
Roku certification criteria, that are available to the public, play a major role in testing the Roku application for Roku development.
To improve the overall quality of the Roku application, the Roku developers assign the task to their teammates for each criterion. Designers and technical managers check the design and performance criteria before being published.
Understanding the requirements of your product
Roku produces a new version of all its devices every year. Its user is going to run the Roku developer’s app on multiple models, from the latest to the five-year-old ones, that users use at home and don’t think to replace soon.
So, the Roku developers make sure that all the platforms and models support all the channel service, for that they consider the following points:-
– The list of the types of features they are going to use in the app.
– The list of the models that support these features.
As there is no User Interface automation available on the Roku development platform. The Roku developers have to do all the feature testing and smoke testing manually that consumes lots of time. There, time management helps to cut the last regression time.
Get familiar with the available tools
Before starting the testing part, the Roku developer should be well-aware of the available tools which are already out there.
Let’s just talk about them one-by-one!
Some of them are:
Stream Tester tool
- It is a tool that helps to check if a private Roku channel is supporting video streaming or not. To know more about this tool, please feel free to read: Three amazing tools for Roku development.
Deep linking tester tool
- It is a tool that gives the ability to launch directly into a piece of content from a display ad or Roku search through ECP protocol. To know more, please refer: Three amazing tools for Roku development.
Unit Test framework tool
The unit test framework tool is a tool for automating test suites for Roku channels. The test runner is the main object that collects all the test cases under the given directories.
- When the Roku developer collects all the test cases, the test runner runs them one by one and collects the results.
- After running all the test cases, the Test runner produces the statistic log with the selected level of critical information in the form of the output.
How to use the unit test framework tool?
- The Roku developers should create a new folder “tests” under the source directory of their project. This will be the root folder for all their unit tests. In this folder, they can create subfolders for all the test suite well.
- The Roku developers create test files in the “tests” folder or subfolders and new .brs files for each test suite. The default pre fixture test suite files are “Test__”. They can use pre fixture but they have to mention it in the next step using Runner. In this new file, they define a function for all the test cases using @Test annotation.
- Run all their tests.
How to run your tests?
- The Roku developers create TestRunner object (Runner = TestRunner()) and call its method Run (Runner.Run()).
- They embrace this code with if statements and define all functions using the SetFunctions method.
- They call the Test runner’s setter methods, before calling the Run method.
- The Roku developers can add SetInclude and Exclude filter functions execution to add selective tests run option and can deploy their channel to the device.
- They post the command to the device through ECP and view the test results by opening a telnet console on the device.
The Roku developers set the verbosity level call, i.e., how critical the information is. There are four verbosity levels in this framework:
- “0” – basic level
- “1” – normal level
- “2” – detailed level (failed tests)
- “3” – detailed level.
They can overwrite the print statistic, like
Runner.logger.printStatistic = custom print function
The framework provides the total number of tests, passed tests, failed tests, and tests that caused a crash with the help of the basic level of the verbosity.
The framework also tells the time spent on running the tests with the help of the basic verbosity level.
Hey, you have done it! Woo hoo!
Almost there! Please complete this form and click the button below to gain instant access.