-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from rokudev/test
v.2.1.0
- Loading branch information
Showing
33 changed files
with
1,351 additions
and
288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...stsExample/components/tests/CustomVideoNode/Test__CustomVideoNode__SampleRSGTestSuite.brs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
samples/RSGTestsExample/components/tests/Hud/Test__Hud__SampleRSGTestSuite1.brs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
samples/RSGTestsExample/components/tests/Hud/Test__Hud__SampleRSGTestSuite2.brs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,69 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- Copyright (c) 2017 Roku, Inc. All rights reserved. --> | ||
<!-- Roku Header File --> | ||
|
||
<component | ||
name="Header" | ||
extends="Group" | ||
xsi:noNamespaceSchemaLocation="https://devtools.web.roku.com/schema/RokuSceneGraph.xsd"> | ||
|
||
<interface> | ||
<field type="node" id="ChannelTitle" /> | ||
<field type="node" id="CurrentlyPlaying"/> | ||
<field type="node" id="ContentDescription"/> | ||
</interface> | ||
|
||
<script type="text/brightscript" uri ="pkg:/components/header.brs"/> | ||
|
||
<children> | ||
<Group | ||
id="Header" | ||
translation="[0,100]"> | ||
<TwitterLabel | ||
id="ChannelTitle" | ||
width="1920" | ||
height="60" | ||
color="0xFFFFFF" | ||
text="Channel" | ||
translation="[0,20]" | ||
horizAlign="center"> | ||
<Font | ||
role="font" | ||
uri="pkg:/fonts/HelveticaNeueLTStd-Roman.otf" | ||
id="HelveticaNeueLTStd-Roman" | ||
size="40" /> | ||
</TwitterLabel> | ||
<TwitterLabel | ||
id="CurrentlyPlaying" | ||
width="1250" | ||
height="200" | ||
color="0xFFFFFFFF" | ||
numLines="2" | ||
maxLines="2" | ||
wrap="true" | ||
text="Twitter for Roku" | ||
translation="[350,80]" | ||
horizAlign="center"> | ||
<Font | ||
role="font" | ||
uri="pkg:/fonts/HelveticaNeueLTStd-Bd.otf" | ||
id="HelveticaNeueLTStd-Bd" | ||
size="100" /> | ||
</TwitterLabel> | ||
<TwitterLabel | ||
id="ContentDescription" | ||
width="1920" | ||
height="60" | ||
color="0xFFFFFF" | ||
text="Watch Live!" | ||
translation="[0,180]" | ||
horizAlign="center"> | ||
<Font | ||
role="font" | ||
uri="pkg:/fonts/HelveticaNeueLTStd-Roman.otf" | ||
id="Helvetica-Roman" | ||
size="40" /> | ||
</TwitterLabel> | ||
</Group> | ||
</children> | ||
</component> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- Copyright (c) 2017 Roku, Inc. All rights reserved. --> | ||
<!-- Roku Header File --> | ||
|
||
<component | ||
name="Header" | ||
extends="Group" | ||
xsi:noNamespaceSchemaLocation="https://devtools.web.roku.com/schema/RokuSceneGraph.xsd"> | ||
|
||
<interface> | ||
<field type="node" id="ChannelTitle" /> | ||
<field type="node" id="CurrentlyPlaying"/> | ||
<field type="node" id="ContentDescription"/> | ||
</interface> | ||
|
||
<script type="text/brightscript" uri ="pkg:/components/header.brs"/> | ||
|
||
<children> | ||
<Group | ||
id="Header" | ||
translation="[0,100]"> | ||
<TwitterLabel | ||
id="ChannelTitle" | ||
width="1920" | ||
height="60" | ||
color="0xFFFFFF" | ||
text="Channel" | ||
translation="[0,20]" | ||
horizAlign="center"> | ||
<Font | ||
role="font" | ||
uri="pkg:/fonts/HelveticaNeueLTStd-Roman.otf" | ||
id="HelveticaNeueLTStd-Roman" | ||
size="40" /> | ||
</TwitterLabel> | ||
<TwitterLabel | ||
id="CurrentlyPlaying" | ||
width="1250" | ||
height="200" | ||
color="0xFFFFFFFF" | ||
numLines="2" | ||
maxLines="2" | ||
wrap="true" | ||
text="Twitter for Roku" | ||
translation="[350,80]" | ||
horizAlign="center"> | ||
<Font | ||
role="font" | ||
uri="pkg:/fonts/HelveticaNeueLTStd-Bd.otf" | ||
id="HelveticaNeueLTStd-Bd" | ||
size="100" /> | ||
</TwitterLabel> | ||
<TwitterLabel | ||
id="ContentDescription" | ||
width="1920" | ||
height="60" | ||
color="0xFFFFFF" | ||
text="Watch Live!" | ||
translation="[0,180]" | ||
horizAlign="center"> | ||
<Font | ||
role="font" | ||
uri="pkg:/fonts/HelveticaNeueLTStd-Roman.otf" | ||
id="Helvetica-Roman" | ||
size="40" /> | ||
</TwitterLabel> | ||
</Group> | ||
</children> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
' Copyright (c) 2017 Roku, Inc. All rights reserved. | ||
' Roku Headers File | ||
|
||
' A sub that initialize header | ||
sub header_Init() | ||
m.top.ChannelTitle = m.top.FindNode("ChannelTitle") | ||
m.top.CurrentlyPlaying = m.top.FindNode("CurrentlyPlaying") | ||
m.top.ContentDescription = m.top.FindNode("ContentDescription") | ||
end sub | ||
' Copyright (c) 2017 Roku, Inc. All rights reserved. | ||
' Roku Headers File | ||
|
||
' A sub that initialize header | ||
sub header_Init() | ||
m.top.ChannelTitle = m.top.FindNode("ChannelTitle") | ||
m.top.CurrentlyPlaying = m.top.FindNode("CurrentlyPlaying") | ||
m.top.ContentDescription = m.top.FindNode("ContentDescription") | ||
end sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
title=unit_test_fw_sample | ||
major_version=1 | ||
minor_version=1 | ||
build_version=0 | ||
mm_icon_focus_hd=pkg:/images/MainMenu_Icon_Center_HD.png | ||
mm_icon_focus_sd=pkg:/images/MainMenu_Icon_Center_SD43.png | ||
mm_icon_side_hd=pkg:/images/MainMenu_Icon_Side_HD.png | ||
mm_icon_side_sd=pkg:/images/MainMenu_Icon_Side_SD43.png | ||
splash_screen_fhd=pkg:/images/splash_fhd.jpg | ||
splash_screen_hd=pkg:/images/splash_hd.jpg | ||
splash_screen_sd=pkg:/images/splash_sd.jpg | ||
ui_resolutions=hd | ||
splash_rsg_optimization=1 | ||
#rsg_global_namespace=1 | ||
title=unit_test_fw_sample | ||
major_version=1 | ||
minor_version=1 | ||
build_version=0 | ||
mm_icon_focus_hd=pkg:/images/MainMenu_Icon_Center_HD.png | ||
mm_icon_focus_sd=pkg:/images/MainMenu_Icon_Center_SD43.png | ||
mm_icon_side_hd=pkg:/images/MainMenu_Icon_Side_HD.png | ||
mm_icon_side_sd=pkg:/images/MainMenu_Icon_Side_SD43.png | ||
splash_screen_fhd=pkg:/images/splash_fhd.jpg | ||
splash_screen_hd=pkg:/images/splash_hd.jpg | ||
splash_screen_sd=pkg:/images/splash_sd.jpg | ||
ui_resolutions=hd | ||
splash_rsg_optimization=1 | ||
#rsg_global_namespace=1 | ||
#rsg_version=1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>SimpleTestApp_SelectiveRuns</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.roku.brightscript.plugin.xml.indexer.RSGComponentsBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.roku.brightscript.ide.eclipse.core.builders.BrightScriptBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.dltk.core.scriptbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.roku.brightscript.ide.eclipse.core.nature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
1. Run import_unit_test_framework.bat or ./import_unit_test_framework.sh or | ||
place the UnitTestFramework.brs file to the testFramework folder manually. | ||
2. Sideload the app to the box. | ||
3. To run the tests POST the following command to the device via ECP: | ||
http://{Roku_box_IP_address}:8060/launch/dev?RunTests=true | ||
|
||
For example: curl -d '' 'http://192.168.0.90:8060/launch/dev?RunTests=true' | ||
|
||
Documentation: https://github.com/rokudev/unit-testing-framework | ||
|
||
## Overview | ||
This is a project to show new approach in building unit tests functions. | ||
|
||
It's based on JUnit 5 annotations approach | ||
|
||
See [JUnit guide ](https://junit.org/junit5/docs/current/user-guide/) | ||
|
||
|
||
For now we support | ||
|
||
* @Test - describes this is a test | ||
* @BeforeAll - function to run before all functions | ||
* @BeforeEach - function to run before each test execution | ||
* @AfterAll - function that will run after all tests in test suite | ||
* @AfterEach - function that will run after each test | ||
* @RepeatedTest(n) - repeats test for n times | ||
* @ParameterizedTest and @MethodSource("argsProviderFunctionName") - parametrized tests | ||
* @Ignore - function that wont be run as test |
Oops, something went wrong.