Add test for simple Ogre context creation

parent e88665eb
FIND_PROGRAM(SIKULI NAMES sikuli-ide)
IF(SIKULI)
IF(UNIX)
ADD_TEST(ogre_context "${SIKULI}" -t testOgreContext.UNIX.sikuli)
ENDIF(UNIX)
ENDIF(SIKULI)
<html>
<head>
<style type="text/css">
.sikuli-code {
font-size: 20px;
font-family: "Osaka-mono", Monospace;
line-height: 1.5em;
display:table-cell;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
width: 99%; /* remove horizontal scroll-bar when viewing in IE7 */
}
.sikuli-code img {
vertical-align: middle;
margin: 2px;
border: 1px solid #ccc;
padding: 2px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-moz-box-shadow: 1px 1px 1px gray;
-webkit-box-shadow: 1px 1px 2px gray;
}
.kw {
color: blue;
}
.skw {
color: rgb(63, 127, 127);
}
.str {
color: rgb(128, 0, 0);
}
.dig {
color: rgb(128, 64, 0);
}
.cmt {
color: rgb(200, 0, 200);
}
h2 {
display: inline;
font-weight: normal;
}
.info {
border-bottom: 1px solid #ddd;
padding-bottom: 5px;
margin-bottom: 20px;
display: none;
}
a {
color: #9D2900;
}
body {
font-family: "Trebuchet MS", Arial, Sans-Serif;
}
</style>
</head>
<body>
<div class="info">
<h2>testStartInterface.UNIX.sikuli</h2> <a href="testStartInterface.UNIX.zip">(Download this script)</a>
</div>
<pre class="sikuli-code">
<span class="kw">def</span> setUp(self):
<span class="kw">import</span> os
ov_binany_path=os.environ[<span class="str">'OV_BINARY_PATH'</span>]
self.terminal = App.open(<span class="str">"xterm -e "</span> + ov_binany_path +<span class="str">"/openvibe-designer.sh --no-session-management --play testOgreContext.xml"</span>)
<span class="kw">while</span> <span class="kw">not</span> self.terminal.window():
<span class="skw">wait</span>(<span class="dig">1</span>)
<span class="skw">wait</span>(<img src="Simple3Dview.png" />,<span class="dig">10</span>)
<span class="kw">def</span> testRunOgreVisual(self):
waitVanish(<img src="Simple3Dview.png" />,<span class="dig">10</span>)
<span class="kw">assert</span>(exists(<img src="designerScreen.png" />))
<span class="kw">def</span> tearDown(self):
<span class="kw">if</span> self.terminal.window():
App.close(self.terminal)
self.terminal= None
</pre>
</body>
</html>
def setUp(self):
import os
ov_binany_path=os.environ['OV_BINARY_PATH']
self.terminal = App.open("xterm -e " + ov_binany_path +"/openvibe-designer.sh --no-session-management --play testOgreContext.xml")
while not self.terminal.window():
wait(1)
wait("Simple3Dview.png",10)
def testRunOgreVisual(self):
waitVanish("Simple3Dview.png",10)
assert(exists("designerScreen.png"))
def tearDown(self):
if self.terminal.window():
App.close(self.terminal)
self.terminal= None
<html>
<head>
<style type="text/css">
.sikuli-code {
font-size: 20px;
font-family: "Osaka-mono", Monospace;
line-height: 1.5em;
display:table-cell;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
width: 99%; /* remove horizontal scroll-bar when viewing in IE7 */
}
.sikuli-code img {
vertical-align: middle;
margin: 2px;
border: 1px solid #ccc;
padding: 2px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-moz-box-shadow: 1px 1px 1px gray;
-webkit-box-shadow: 1px 1px 2px gray;
}
.kw {
color: blue;
}
.skw {
color: rgb(63, 127, 127);
}
.str {
color: rgb(128, 0, 0);
}
.dig {
color: rgb(128, 64, 0);
}
.cmt {
color: rgb(200, 0, 200);
}
h2 {
display: inline;
font-weight: normal;
}
.info {
border-bottom: 1px solid #ddd;
padding-bottom: 5px;
margin-bottom: 20px;
display: none;
}
a {
color: #9D2900;
}
body {
font-family: "Trebuchet MS", Arial, Sans-Serif;
}
</style>
</head>
<body>
<div class="info">
<h2>testStartInterface.UNIX.sikuli</h2> <a href="testStartInterface.UNIX.zip">(Download this script)</a>
</div>
<pre class="sikuli-code">
<span class="kw">def</span> setUp(self):
<span class="kw">import</span> os
ov_binany_path=os.environ[<span class="str">'OV_BINARY_PATH'</span>]
self.terminal = App.open(<span class="str">"xterm -e "</span> + ov_binany_path +<span class="str">"/openvibe-designer.sh --no-session-management"</span>)
<span class="kw">while</span> <span class="kw">not</span> self.terminal.window():
<span class="skw">wait</span>(<span class="dig">1</span>)
<span class="skw">wait</span>(<img src="StartInterface.png" />,<span class="dig">10</span>)
<span class="kw">def</span> test_createSimpleScenarioAndRun(self):
<span class="skw">click</span>(Pattern(<img src="Datagenerati.png" />).targetOffset(-<span class="dig">70</span>,-<span class="dig">1</span>))
<span class="skw">dragDrop</span>(<img src="Sinusoscilla-1.png" />,Pattern(<img src="DesignerDataGenOpen.png" />).targetOffset(-<span class="dig">233</span>,-<span class="dig">163</span>))
<span class="kw">assert</span>(exists(<img src="SinusOscillatorBoxSelected.png" />))
<span class="skw">click</span>(Pattern(<img src="Visualisatio.png" />).targetOffset(-<span class="dig">62</span>,<span class="dig">0</span>))
<span class="skw">click</span>(Pattern(<img src="Basic.png" />).targetOffset(-<span class="dig">50</span>,-<span class="dig">1</span>))
<span class="skw">dragDrop</span>(<img src="Signaldisplay.png" />, Pattern(<img src="designerSinusGenPlaced.png" />).targetOffset(-<span class="dig">197</span>,-<span class="dig">16</span>))
<span class="kw">assert</span>(exists(<img src="SignalDisplayBoxSelected.png" />))
<span class="skw">dragDrop</span>(<img src="outputSignalConnector.png" />, <img src="imputSingnalConnector.png" />)
<span class="skw">click</span>(Pattern(<img src="playButton.png" />).similar(<span class="dig">0.95</span>))
<span class="skw">wait</span>(<span class="dig">6</span>)
<span class="kw">assert</span>(exists(Pattern(<img src="SignalDisplayWindow.png" />).similar(<span class="dig">0.46</span>)))
<span class="skw">dragDrop</span>(Pattern(<img src="SignalDisplayWindow.png" />).similar(<span class="dig">0.46</span>).targetOffset(<span class="dig">2</span>,-<span class="dig">157</span>),Pattern(<img src="SignalDisplayWindow.png" />).similar(<span class="dig">0.46</span>).targetOffset(-<span class="dig">102</span>,<span class="dig">137</span>))
<span class="skw">click</span>(<img src="stopButton.png" />)
waitVanish(Pattern(<img src="SignalDisplayWindow.png" />).similar(<span class="dig">0.58</span>))
<span class="skw">type</span>(<span class="str">"w"</span>,KeyModifier.CTRL)
<span class="kw">assert</span>(exists(<img src="SavechangePopup.png" />))
<span class="skw">click</span>(Pattern(<img src="SavechangePopup.png" />).targetOffset(-<span class="dig">170</span>,<span class="dig">56</span>))
waitVanish(Pattern(<img src="SavechangePopup.png" />).targetOffset(-<span class="dig">170</span>,<span class="dig">56</span>),<span class="dig">3</span>)
<span class="skw">type</span>(<span class="str">"n"</span>,KeyModifier.CTRL)
<span class="skw">wait</span>(<span class="dig">1</span>)
<span class="kw">def</span> tearDown(self):
<span class="kw">if</span> self.terminal.window():
App.close(self.terminal)
self.terminal= None
</pre>
</body>
</html>
def setUp(self):
import os
ov_binany_path=os.environ['OV_BINARY_PATH']
self.terminal = App.open("xterm -e " + ov_binany_path +"/openvibe-designer.sh --no-session-management")
while not self.terminal.window():
wait(1)
wait("StartInterface.png",10)
def test_createSimpleScenarioAndRun(self):
click(Pattern("Datagenerati.png").targetOffset(-70,-1))
dragDrop("Sinusoscilla-1.png",Pattern("DesignerDataGenOpen.png").targetOffset(-233,-163))
assert(exists("SinusOscillatorBoxSelected.png"))
click(Pattern("Visualisatio.png").targetOffset(-62,0))
click(Pattern("Basic.png").targetOffset(-50,-1))
dragDrop("Signaldisplay.png", Pattern("designerSinusGenPlaced.png").targetOffset(-197,-16))
assert(exists("SignalDisplayBoxSelected.png"))
dragDrop("outputSignalConnector.png", "imputSingnalConnector.png")
click(Pattern("playButton.png").similar(0.95))
wait(6)
assert(exists(Pattern("SignalDisplayWindow.png").similar(0.46)))
dragDrop(Pattern("SignalDisplayWindow.png").similar(0.46).targetOffset(2,-157),Pattern("SignalDisplayWindow.png").similar(0.46).targetOffset(-102,137))
click("stopButton.png")
waitVanish(Pattern("SignalDisplayWindow.png").similar(0.58))
type("w",KeyModifier.CTRL)
assert(exists("SavechangePopup.png"))
click(Pattern("SavechangePopup.png").targetOffset(-170,56))
waitVanish(Pattern("SavechangePopup.png").targetOffset(-170,56),3)
type("n",KeyModifier.CTRL)
wait(1)
def tearDown(self):
if self.terminal.window():
App.close(self.terminal)
self.terminal= None
<OpenViBE-Scenario>
<Boxes>
<Box>
<Identifier>(0x1833aa75, 0x135b1bc4)</Identifier>
<Name>Simple 3D viewer</Name>
<AlgorithmClassIdentifier>(0x31a00483, 0x35924e6b)</AlgorithmClassIdentifier>
<Attributes>
<Attribute>
<Identifier>(0x1fa7a38f, 0x54edbe0b)</Identifier>
<Value>80.000000</Value>
</Attribute>
<Attribute>
<Identifier>(0x1fa963f5, 0x1a638cd4)</Identifier>
<Value>27</Value>
</Attribute>
<Attribute>
<Identifier>(0x207c9054, 0x3c841b63)</Identifier>
<Value>96.000000</Value>
</Attribute>
<Attribute>
<Identifier>(0x4e7b798a, 0x183beafb)</Identifier>
<Value>(0xffffffff, 0xffffffff)</Value>
</Attribute>
<Attribute>
<Identifier>(0xad100179, 0xa3c984ab)</Identifier>
<Value>124</Value>
</Attribute>
<Attribute>
<Identifier>(0xc46b3d00, 0x3e0454e1)</Identifier>
<Value>(0x00000000, 0x04e6f2f2)</Value>
</Attribute>
<Attribute>
<Identifier>(0xc73e83ec, 0xf855c5bc)</Identifier>
<Value>false</Value>
</Attribute>
</Attributes>
</Box>
<Box>
<Identifier>(0x2907751f, 0x5707c877)</Identifier>
<Name>Clock stimulator</Name>
<AlgorithmClassIdentifier>(0x4f756d3f, 0x29ff0b96)</AlgorithmClassIdentifier>
<Outputs>
<Output>
<TypeIdentifier>(0x6f752dd0, 0x082a321e)</TypeIdentifier>
<Name>Generated stimulations</Name>
</Output>
</Outputs>
<Settings>
<Setting>
<TypeIdentifier>(0x512a166f, 0x5c3ef83f)</TypeIdentifier>
<Name>Interstimulation interval (in sec)</Name>
<DefaultValue>1.0</DefaultValue>
<Value>1.0</Value>
</Setting>
<Setting>
<TypeIdentifier>(0x2c132d6e, 0x44ab0d97)</TypeIdentifier>
<Name>Stimulation</Name>
<DefaultValue>OVTK_StimulationId_Label_00</DefaultValue>
<Value>OVTK_StimulationId_Label_00</Value>
</Setting>
</Settings>
<Attributes>
<Attribute>
<Identifier>(0x1fa7a38f, 0x54edbe0b)</Identifier>
<Value>48.000000</Value>
</Attribute>
<Attribute>
<Identifier>(0x1fa963f5, 0x1a638cd4)</Identifier>
<Value>27</Value>
</Attribute>
<Attribute>
<Identifier>(0x207c9054, 0x3c841b63)</Identifier>
<Value>304.000000</Value>
</Attribute>
<Attribute>
<Identifier>(0x4e7b798a, 0x183beafb)</Identifier>
<Value>(0x27b3ee3c, 0xc50527e6)</Value>
</Attribute>
<Attribute>
<Identifier>(0xad100179, 0xa3c984ab)</Identifier>
<Value>129</Value>
</Attribute>
<Attribute>
<Identifier>(0xc46b3d00, 0x3e0454e1)</Identifier>
<Value>(0x00000000, 0x025b20b3)</Value>
</Attribute>
<Attribute>
<Identifier>(0xc73e83ec, 0xf855c5bc)</Identifier>
<Value>false</Value>
</Attribute>
<Attribute>
<Identifier>(0xc80ce8af, 0xf699f813)</Identifier>
<Value>1</Value>
</Attribute>
<Attribute>
<Identifier>(0xce18836a, 0x9c0eb403)</Identifier>
<Value>2</Value>
</Attribute>
</Attributes>
</Box>
<Box>
<Identifier>(0x315af00a, 0x0596147e)</Identifier>
<Name>Player Controller</Name>
<AlgorithmClassIdentifier>(0x5f426dce, 0x08456e13)</AlgorithmClassIdentifier>
<Inputs>
<Input>
<TypeIdentifier>(0x6f752dd0, 0x082a321e)</TypeIdentifier>
<Name>Stimulations</Name>
</Input>
</Inputs>
<Settings>
<Setting>
<TypeIdentifier>(0x2c132d6e, 0x44ab0d97)</TypeIdentifier>
<Name>Stimulation name</Name>
<DefaultValue>OVTK_StimulationId_Label_00</DefaultValue>
<Value>OVTK_StimulationId_Label_00</Value>
</Setting>
<Setting>
<TypeIdentifier>(0xcc14d8d6, 0xf27ecb73)</TypeIdentifier>
<Name>Action to perform</Name>
<DefaultValue>Pause</DefaultValue>
<Value>Stop</Value>
</Setting>
</Settings>
<Attributes>
<Attribute>
<Identifier>(0x1fa7a38f, 0x54edbe0b)</Identifier>
<Value>128.000000</Value>
</Attribute>
<Attribute>
<Identifier>(0x1fa963f5, 0x1a638cd4)</Identifier>
<Value>27</Value>
</Attribute>
<Attribute>
<Identifier>(0x207c9054, 0x3c841b63)</Identifier>
<Value>304.000000</Value>
</Attribute>
<Attribute>
<Identifier>(0x4e7b798a, 0x183beafb)</Identifier>
<Value>(0x568d148e, 0x650792b3)</Value>
</Attribute>
<Attribute>
<Identifier>(0xad100179, 0xa3c984ab)</Identifier>
<Value>134</Value>
</Attribute>
<Attribute>
<Identifier>(0xc46b3d00, 0x3e0454e1)</Identifier>
<Value>(0x00000000, 0x01028a1c)</Value>
</Attribute>
<Attribute>
<Identifier>(0xc67a01dc, 0x28ce06c1)</Identifier>
<Value></Value>
</Attribute>
<Attribute>
<Identifier>(0xc73e83ec, 0xf855c5bc)</Identifier>
<Value>false</Value>
</Attribute>
<Attribute>
<Identifier>(0xce18836a, 0x9c0eb403)</Identifier>
<Value>2</Value>
</Attribute>
<Attribute>
<Identifier>(0xcfad85b0, 0x7c6d841c)</Identifier>
<Value>1</Value>
</Attribute>
</Attributes>
</Box>
</Boxes>
<Links>
<Link>
<Identifier>(0x18af3aef, 0x4571d182)</Identifier>
<Source>
<BoxIdentifier>(0x2907751f, 0x5707c877)</BoxIdentifier>
<BoxOutputIndex>0</BoxOutputIndex>
</Source>
<Target>
<BoxIdentifier>(0x315af00a, 0x0596147e)</BoxIdentifier>
<BoxInputIndex>0</BoxInputIndex>
</Target>
<Attributes>
<Attribute>
<Identifier>(0x1b32c44c, 0x1905e0e9)</Identifier>
<Value>68</Value>
</Attribute>
<Attribute>
<Identifier>(0x358ae8b5, 0x0f8bacd1)</Identifier>
<Value>304</Value>
</Attribute>
<Attribute>
<Identifier>(0x3f0a3b27, 0x570913d2)</Identifier>
<Value>110</Value>
</Attribute>
<Attribute>
<Identifier>(0x6267b5c5, 0x676e3e42)</Identifier>
<Value>304</Value>
</Attribute>
</Attributes>
</Link>
</Links>
<MessageLinks></MessageLinks>
<Comments></Comments>
<VisualisationTree>
<VisualisationWidget>
<Identifier>(0x28ce4caa, 0x41c2d232)</Identifier>
<Name>Default window</Name>
<Type>1</Type>
<ParentIdentifier>(0xffffffff, 0xffffffff)</ParentIdentifier>
<BoxIdentifier>(0xffffffff, 0xffffffff)</BoxIdentifier>
<NumChildren>1</NumChildren>
<Attributes>
<Attribute>
<Identifier>(0x4c90d4ad, 0x7a2554ec)</Identifier>
<Value>320</Value>
</Attribute>
<Attribute>
<Identifier>(0x7b814cca, 0x271df6dd)</Identifier>
<Value>480</Value>
</Attribute>
</Attributes>
</VisualisationWidget>
<VisualisationWidget>
<Identifier>(0x49324771, 0x753fb7ec)</Identifier>
<Type>3</Type>
<ParentIdentifier>(0xffffffff, 0xffffffff)</ParentIdentifier>
<BoxIdentifier>(0x1833aa75, 0x135b1bc4)</BoxIdentifier>
<NumChildren>0</NumChildren>
</VisualisationWidget>
<VisualisationWidget>
<Identifier>(0x4a479e46, 0x0eb0dfd5)</Identifier>
<Name>Default tab</Name>
<Type>2</Type>
<ParentIdentifier>(0x28ce4caa, 0x41c2d232)</ParentIdentifier>
<Index>0</Index>
<BoxIdentifier>(0xffffffff, 0xffffffff)</BoxIdentifier>
<NumChildren>1</NumChildren>
</VisualisationWidget>
<VisualisationWidget>
<Identifier>(0x2b28a46b, 0x1eb43059)</Identifier>
<Name>Empty</Name>
<Type>0</Type>
<ParentIdentifier>(0x4a479e46, 0x0eb0dfd5)</ParentIdentifier>
<Index>0</Index>
<BoxIdentifier>(0xffffffff, 0xffffffff)</BoxIdentifier>
<NumChildren>0</NumChildren>
</VisualisationWidget>
</VisualisationTree>
</OpenViBE-Scenario>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment