Changed implementation of manual tests to fully automate them.
Tests that has been changed:
+ SoundManager_setSoundModeChangeListener
+ SoundManager_unsetSoundModeChangeListener
+ SoundModeChangeCallback_onsuccess
Added method executeCommand to unitcommon.js.
Updated documentation on changed tests.
Change-Id: I44c0948645dc2dc516aaa0ce373775ec5662cd0e
Signed-off-by: Mateusz Plesinski <m.plesinski@samsung.com>
<title>SoundManager_setSoundModeChangeListener</title>
<meta charset="utf-8"/>
<script src="support/unitcommon.js"></script>
+<script src="support/sound_common.js"></script>
</head>
<body>
<div id="log"></div>
//==== PRIORITY P1
//==== TEST_CRITERIA MR
+executeCommand(setSoundStateCommand(true));
+executeCommand(setVibrationStateCommand(true));
+
setup({timeout: 30000});
var t = async_test(document.title, {timeout: 30000}), successCallback, retValue;
});
retValue = tizen.sound.setSoundModeChangeListener(successCallback);
- alert("1. Goto Settings -> Sound -> Sound mode -> Vibration" +
- "2. Then swich back to testing page\n");
+
+ executeCommand(setSoundStateCommand(false));
});
</script>
<title>SoundManager_unsetSoundModeChangeListener</title>
<meta charset="utf-8"/>
<script src="support/unitcommon.js"></script>
+<script src="support/sound_common.js"></script>
</head>
<body>
<div id="log"></div>
//==== PRIORITY: P1
//==== TEST_CRITERIA MR MAST
+executeCommand(setSoundStateCommand(true));
+executeCommand(setVibrationStateCommand(true));
+
setup({timeout: 30000});
var t = async_test(document.title, {timeout: 30000}), successCallback, retValue = null;
t.done();
});
tizen.sound.setSoundModeChangeListener(successCallback);
- alert("1. Goto Settings -> Sound -> Sound mode -> Vibrate" +
- "2. Then swich back to testing page\n");
+
+ executeCommand(setSoundStateCommand(false));
});
</script>
<head>
<title>SoundModeChangeCallback_onsuccess</title>
<meta charset="utf-8"/>
+<script src="support/sound_common.js"></script>
<script src="support/unitcommon.js"></script>
</head>
<body>
//==== PRIORITY P1
//==== TEST_CRITERIA CBOA CBT
+executeCommand(setSoundStateCommand(true));
+executeCommand(setVibrationStateCommand(true));
+
setup({timeout: 30000});
var t = async_test(document.title, {timeout: 30000}), getSuccess, successCallback;
});
tizen.sound.setSoundModeChangeListener(successCallback);
- alert("1. Goto Settings -> Sound -> Sound mode -> Vibration" +
- "2. Then swich back to testing page\n");
+
+ executeCommand(setSoundStateCommand(false));
});
</script>
var NOT_FOUND_ERR = "NotFoundError";
var NOT_SUPPORT_ERR = "NotSupportedError";
-var APPLICATION_ID = "testalar00.alarmTestApp";
\ No newline at end of file
+var APPLICATION_ID = "testalar00.alarmTestApp";
+
+function setSoundStateCommand(turnOn){
+ var TCT_SET_SOUND_COMMAND = "vconftool set -f -t bool db/setting/sound/sound_on";
+
+ if (turnOn){
+ return TCT_SET_SOUND_COMMAND + " 1";
+ } else {
+ return TCT_SET_SOUND_COMMAND + " 0";
+ }
+}
+
+function setVibrationStateCommand(turnOn){
+ var TCT_SET_VIBRATION_COMMAND = "vconftool set -f -t bool db/setting/sound/vibration_on";
+
+ if (turnOn){
+ return TCT_SET_VIBRATION_COMMAND + " 1";
+ } else {
+ return TCT_SET_VIBRATION_COMMAND + " 0";
+ }
+}
+
+document.write('<script src="../webrunner/jquery-1.10.2.min.js"></script>');
\ No newline at end of file
return result;
}
+
+function executeCommand(command) {
+ var toSend = {'cmd' : command};
+ var response = $.ajax({
+ type: "POST",
+ url: 'http://127.0.0.1:8000/execute_command',
+ async: false,
+ dataType: 'json',
+ data: toSend
+ });
+ //This log provides console output after executing shell command.
+ console.log(JSON.stringify(response));
+ return response
+}
\ No newline at end of file
</spec>
</specs>
</testcase>
- <testcase purpose="Check if SoundManager::setSoundModeChangeListener() method can be called" type="compliance" status="approved" onload_delay="30" component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" priority="P1" id="SoundManager_setSoundModeChangeListener">
+ <testcase purpose="Check if SoundManager::setSoundModeChangeListener() method can be called" type="compliance" status="approved" onload_delay="30" component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" priority="P1" id="SoundManager_setSoundModeChangeListener">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"Vibration"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_setSoundModeChangeListener.html</test_script_entry>
</description>
<specs>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if SoundManager::unsetSoundModeChangeListener() method can be called" type="compliance" status="approved" component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" onload_delay="30" priority="P1" id="SoundManager_unsetSoundModeChangeListener">
+ <testcase purpose="Check if SoundManager::unsetSoundModeChangeListener() method can be called" type="compliance" status="approved" component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" onload_delay="30" priority="P1" id="SoundManager_unsetSoundModeChangeListener">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"mute"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_unsetSoundModeChangeListener.html</test_script_entry>
</description>
<specs>
</spec>
</specs>
</testcase>
- <testcase purpose="Test whether SoundModeChangeCallback::onsuccess is called with argument of proper type" type="compliance" status="approved" component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" onload_delay="30" priority="P1" id="SoundModeChangeCallback_onsuccess">
+ <testcase purpose="Test whether SoundModeChangeCallback::onsuccess is called with argument of proper type" type="compliance" status="approved" component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" onload_delay="30" priority="P1" id="SoundModeChangeCallback_onsuccess">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"Vibration"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundModeChangeCallback_onsuccess.html</test_script_entry>
</description>
<specs>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if SoundManager::setSoundModeChangeListener() method can be called" type="compliance" status="approved" onload_delay="30" component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" priority="P1" id="SoundManager_setSoundModeChangeListener">
+ <testcase purpose="Check if SoundManager::setSoundModeChangeListener() method can be called" type="compliance" status="approved" onload_delay="30" component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" priority="P1" id="SoundManager_setSoundModeChangeListener">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"Vibration"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_setSoundModeChangeListener.html</test_script_entry>
</description>
<specs>
</spec>
</specs>
</testcase>
- <testcase purpose="Check if SoundManager::unsetSoundModeChangeListener() method can be called" type="compliance" status="approved" component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" onload_delay="30" priority="P1" id="SoundManager_unsetSoundModeChangeListener">
+ <testcase purpose="Check if SoundManager::unsetSoundModeChangeListener() method can be called" type="compliance" status="approved" component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" onload_delay="30" priority="P1" id="SoundManager_unsetSoundModeChangeListener">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"mute"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_unsetSoundModeChangeListener.html</test_script_entry>
</description>
<specs>
</spec>
</specs>
</testcase>
- <testcase purpose="Test whether SoundModeChangeCallback::onsuccess is called with argument of proper type" type="compliance" status="approved" component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" onload_delay="30" priority="P1" id="SoundModeChangeCallback_onsuccess">
+ <testcase purpose="Test whether SoundModeChangeCallback::onsuccess is called with argument of proper type" type="compliance" status="approved" component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" onload_delay="30" priority="P1" id="SoundModeChangeCallback_onsuccess">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"Vibration"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundModeChangeCallback_onsuccess.html</test_script_entry>
</description>
<specs>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_getSoundMode_extra_argument.html</test_script_entry>
</description>
</testcase>
- <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" id="SoundManager_setSoundModeChangeListener" onload_delay="30" priority="P1" purpose="Check if SoundManager::setSoundModeChangeListener() method can be called">
+ <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" id="SoundManager_setSoundModeChangeListener" onload_delay="30" priority="P1" purpose="Check if SoundManager::setSoundModeChangeListener() method can be called">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"Vibration"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_setSoundModeChangeListener.html</test_script_entry>
</description>
</testcase>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_setSoundModeChangeListener_misarg.html</test_script_entry>
</description>
</testcase>
- <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" id="SoundManager_unsetSoundModeChangeListener" onload_delay="30" priority="P1" purpose="Check if SoundManager::unsetSoundModeChangeListener() method can be called">
+ <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" id="SoundManager_unsetSoundModeChangeListener" onload_delay="30" priority="P1" purpose="Check if SoundManager::unsetSoundModeChangeListener() method can be called">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"vibrate"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_unsetSoundModeChangeListener.html</test_script_entry>
</description>
</testcase>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundModeChangeCallback_notexist.html</test_script_entry>
</description>
</testcase>
- <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" id="SoundModeChangeCallback_onsuccess" onload_delay="30" priority="P1" purpose="Test whether SoundModeChangeCallback::onsuccess is called with argument of proper type">
+ <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" id="SoundModeChangeCallback_onsuccess" onload_delay="30" priority="P1" purpose="Test whether SoundModeChangeCallback::onsuccess is called with argument of proper type">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"Vibration"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundModeChangeCallback_onsuccess.html</test_script_entry>
</description>
</testcase>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_getSoundMode_extra_argument.html</test_script_entry>
</description>
</testcase>
- <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" id="SoundManager_setSoundModeChangeListener" onload_delay="30" priority="P1" purpose="Check if SoundManager::setSoundModeChangeListener() method can be called">
+ <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" id="SoundManager_setSoundModeChangeListener" onload_delay="30" priority="P1" purpose="Check if SoundManager::setSoundModeChangeListener() method can be called">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"Vibration"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_setSoundModeChangeListener.html</test_script_entry>
</description>
</testcase>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_setSoundModeChangeListener_misarg.html</test_script_entry>
</description>
</testcase>
- <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" id="SoundManager_unsetSoundModeChangeListener" onload_delay="30" priority="P1" purpose="Check if SoundManager::unsetSoundModeChangeListener() method can be called">
+ <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" id="SoundManager_unsetSoundModeChangeListener" onload_delay="30" priority="P1" purpose="Check if SoundManager::unsetSoundModeChangeListener() method can be called">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"vibrate"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_unsetSoundModeChangeListener.html</test_script_entry>
</description>
</testcase>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundModeChangeCallback_notexist.html</test_script_entry>
</description>
</testcase>
- <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" id="SoundModeChangeCallback_onsuccess" onload_delay="30" priority="P1" purpose="Test whether SoundModeChangeCallback::onsuccess is called with argument of proper type">
+ <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" id="SoundModeChangeCallback_onsuccess" onload_delay="30" priority="P1" purpose="Test whether SoundModeChangeCallback::onsuccess is called with argument of proper type">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"Vibration"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundModeChangeCallback_onsuccess.html</test_script_entry>
</description>
</testcase>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_getSoundMode_extra_argument.html</test_script_entry>
</description>
</testcase>
- <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" id="SoundManager_setSoundModeChangeListener" onload_delay="30" priority="P1" purpose="Check if SoundManager::setSoundModeChangeListener() method can be called">
+ <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" id="SoundManager_setSoundModeChangeListener" onload_delay="30" priority="P1" purpose="Check if SoundManager::setSoundModeChangeListener() method can be called">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"Vibration"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_setSoundModeChangeListener.html</test_script_entry>
</description>
</testcase>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_setSoundModeChangeListener_misarg.html</test_script_entry>
</description>
</testcase>
- <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" id="SoundManager_unsetSoundModeChangeListener" onload_delay="30" priority="P1" purpose="Check if SoundManager::unsetSoundModeChangeListener() method can be called">
+ <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" id="SoundManager_unsetSoundModeChangeListener" onload_delay="30" priority="P1" purpose="Check if SoundManager::unsetSoundModeChangeListener() method can be called">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"vibrate"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_unsetSoundModeChangeListener.html</test_script_entry>
</description>
</testcase>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundModeChangeCallback_notexist.html</test_script_entry>
</description>
</testcase>
- <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" id="SoundModeChangeCallback_onsuccess" onload_delay="30" priority="P1" purpose="Test whether SoundModeChangeCallback::onsuccess is called with argument of proper type">
+ <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" id="SoundModeChangeCallback_onsuccess" onload_delay="30" priority="P1" purpose="Test whether SoundModeChangeCallback::onsuccess is called with argument of proper type">
<description>
- <pre_condition>before Click run,set "sound" in sound mode(without sound mode changes,the change callback won't be invoked</pre_condition>
- <steps>
- <step order="1">
- <step_desc>Settings -> Sound -> Sound mode ->"Vibration"</step_desc>
- <expected>Pass</expected>
- </step>
- </steps>
<test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundModeChangeCallback_onsuccess.html</test_script_entry>
</description>
</testcase>