Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Level 7

BUG: Unit Test Framework - Component naming

When you have 2 or more components which names start similar (same prefix) there is a log error that warns about the test execution.

Example:

Let's say I have 2 scenegraph components: MainComponent and MainComponentItem

I created the unit test suites for both following the framework recommendations. Check the code files here.

When I run the unit tests, I got the following:

******************************************************************
******************************************************************
*************            Start testing               *************
******************************************************************
***   TestSuite__MainComponent: Simple unit test for MainComponent - Success
***   TestSuite__MainComponentItem: Simple unit test for MainComponentItem - Success
***
***   Total  = 2 ; Passed  =  2 ; Failed   =  0 ; Skipped   =  0 ; Crashes  =  0***   Time spent:  40ms
***
******************************************************************
*************             End testing                *************
******************************************************************
******************************************************************

NOTE: If some your tests haven't been executed this might be due to outdated list of functions
To resolve this issue please execute

------------------------------------------------------------------------------------------------------------------------

Create this function below in one of these files
TestSuite__MainComponent.brs, TestSuite__MainComponentItem.brs, 

sub init()
Runner.SetFunctions([
    testCase
])
For example we think this might resolve your issue
Runner = TestRunner()
Runner.SetFunctions([
    TestSuite__MainComponentItem
])
end sub

 

Let me know you comments!

Thank you!

Tags (3)