diff options
Diffstat (limited to 'tests/systemtests/sys_feedback/sys_feedback.qtt')
-rw-r--r-- | tests/systemtests/sys_feedback/sys_feedback.qtt | 166 |
1 files changed, 89 insertions, 77 deletions
diff --git a/tests/systemtests/sys_feedback/sys_feedback.qtt b/tests/systemtests/sys_feedback/sys_feedback.qtt index c07fd6b86e..127555788d 100644 --- a/tests/systemtests/sys_feedback/sys_feedback.qtt +++ b/tests/systemtests/sys_feedback/sys_feedback.qtt @@ -41,106 +41,118 @@ //TESTED_COMPONENT=src/feedback -function startHapticsPlayerTestApp() -{ - prompt('Start application \'hapticsplayer\''); -} - -function startHapticsSquareTestApp() -{ - prompt('Start application \'hapticsquare\''); -} - - testcase = { - runTestApplication: function() - { - startHapticsPlayerTestApp(); - if (!runAsManualTest()){ - // ensure we have a widget to work with, dump its details - // TODO when run this test case 'automaticly' then enable this following code - //print('Focus widget is' + focusWidget()); - }else{ - prompt('Verify test application started and closed without issue'); - } - - startHapticsSquareTestApp(); - if (!runAsManualTest()){ - // ensure we have a widget to work with, dump its details - // TODO when run this test case 'automaticly' then enable this following code - //print('Focus widget is' + focusWidget()); - }else{ - prompt('Verify test application started and closed without issue'); - } - }, - - vibrate_using_lowlevel_API_data : { - vibrateSet : [ - [ - {duration:2000, intensity:1, comment:'intense vibration, for two seconds'}, - {duration:4000, intensity:1, comment:'intense vibration for four seconds'}, - {duration:2000, intensity:0.5, comment:'half strength vibration, for two seconds'}, - {duration:2000, intensity:0.1, comment:'very low vibration, for two seconds'}, - {duration:2000, intensity:0.0 ,comment:'no vibration, for two seconds'}, - ] - ] + intense_two_seconds : [2000, 1, 'intense vibration, for two seconds'], + intense_four_seconds : [4000, 1, 'intense vibration for four seconds'], + half_two_seconds : [2000, 0.5, 'half strength vibration, for two seconds'], + low_two_seconds : [2000, 0.1, 'very low vibration, for two seconds'], + no_two_seconds : [2000, 0.0 ,'no vibration, for two seconds'] }, - vibrate_using_lowlevel_API: function(vibrateSet) + vibrate_using_lowlevel_API: function(duration, intensity, comment) { - startHapticsPlayerTestApp(); - for (var index = 0; index < vibrateSet.length; index++){ - enter(vibrateSet[index].duration, 'duration'); - enter(vibrateSet[index].intensity, 'intensity'); - select('Play'); - prompt('Verify that sound matches:' + vibrateSet[index].comment); - } + // Test meta data + testApplication = "Feedback - Vibrate Using Low Level API"; + testBinary = "hapticsplayer"; + testGoal = "Verify that vibrate functionality can be called with low level API"; + testPreconditions = "None"; + testGroups = "BAT"; + + // Test steps +// enter(duration, 'duration'); +// enter(intensity, 'intensity'); + + prompt(twiki("---+++ " + testApplication + "<br><br> + *Goal:* " + testGoal + "<br> + *Pre-Requisites:* " + testPreconditions + "<br> + *Tested Binary:* " + testBinary + "<br> + + | *Step* | *Verification* | + | Launch " + testBinary + " | App launches normally | + | Enter *" + duration + "* into duration field | | + | Enter *" + intensity + "* into intensity field | | + | Select *Play* | Verify that sound matches: '*" + comment + "*' | + ")); }, vibrate_using_highlevel_API: function() { - startHapticsPlayerTestApp(); - prompt('If \'high-level\' tab is disabled skip this test'); - select('high-level', tabBar()); - prompt('For each value of combobox'); - prompt('* Click the \'Play\' button'); - prompt('* Verify that the expected effect is heard'); + // Test meta data + testApplication = "Feedback - Vibrate Using High Level API"; + testBinary = "hapticsplayer"; + testGoal = "Verify that vibrate functionality can be called with high level API."; + testPreconditions = "'High-Level' tab must be enabled"; + testGroups = "BAT"; + + // Test steps + prompt(twiki("---+++ " + testApplication + "<br><br> + *Goal:* " + testGoal + "<br> + *Pre-Requisites:* " + testPreconditions + "<br> + *Tested Binary:* " + testBinary + "<br> + + | *Step* | *Verification* | + | Launch " + testBinary + " | App launches normally | + | Select high-level tab | | + | For each value of combobox, Click the 'Play' button | Verify that the expected effect is heard | + ")); }, vibrate_using_file_API: function() { - startHapticsPlayerTestApp(); - prompt('If \'file\' tab is disabled or no platform specific effect file is aviable skip this test'); - select('file', tabBar()); - select('...'); - prompt('Enter locations to effect file'); - select ('Open'); - select('Play/pause'); - prompt('Verify that the expected effect is heard'); - select('Play/pause'); - select('Stop'); - prompt('Verify that the expected effect is stoped before it is completed'); + // Test meta data + testApplication = "Feedback - Play File"; + testBinary = "hapticsplayer"; + testGoal = "Verify that feedback mechanism works using a specified files."; + testPreconditions = "1. 'File' tab must be enabled.<br> + 1. Platform specific effect file must be available."; + testGroups = "BAT"; + + // Test steps + prompt(twiki("---+++ " + testApplication + "<br><br> + *Goal:* " + testGoal + "<br> + *Pre-Requisites:* " + testPreconditions + "<br> + *Tested Binary:* " + testBinary + "<br> + + | *Step* | *Verification* | + | Launch " + testBinary + " | App launches normally | + | select 'File' | | + | select '...' | | + | enter location to effect file and select *Open* | | + | select 'Play/pause' | Verify that the expected effect is heard | + | select 'Play/pause' again and quickly select 'Stop' | Verify that the expected effect is stoped before it is completed | + ")); }, simple_vibrate_test_data: { - effectNames : [ - ['Rumble', 'Ocean', 'Click', 'Oops'] - ] + rumble : ['Rumble'], + ocean: ['Ocean'], + click : ['Click'], + oops : ['Oops'] }, - simple_vibrate_test: function(effectNames) + simple_vibrate_test: function(effect) { - startHapticsSquareTestApp(); - prompt('If device does not have a touch screen/mouse skip this test'); - for (var index=0; index < effectNames.length; index++){ - select(effectNames[index]); - prompt('Verify effects sounds like:' + effectNames[index]); - } + // Test meta data + testApplication = "Feedback - Effects"; + testBinary = "hapticsquare"; + testGoal = "Verify that feedback mechanism works with selected effects."; + testPreconditions = "tested device must have a touch screen/mouse"; + testGroups = "BAT"; + + // Test steps + prompt(twiki("---+++ " + testApplication + "<br><br> + *Goal:* " + testGoal + "<br> + *Pre-Requisites:* " + testPreconditions + "<br> + *Tested Binary:* " + testBinary + "<br> + + | *Step* | *Verification* | + | Launch " + testBinary + " | App launches normally | + | select '" + effect + "' | Verify effects sounds like: " + effect + "|")); } } // end of testcase |