From: Sanghoon Lee Date: Wed, 18 Jul 2018 02:52:32 +0000 (+0900) Subject: [Resource][Non-ACR][Removed unnecessary files] X-Git-Tag: tct5.0_m2~150 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F23%2F184423%2F1;p=test%2Ftct%2Fcsharp%2Fapi.git [Resource][Non-ACR][Removed unnecessary files] Change-Id: I2dbdd998d6e1b455491e33cd01fb52b898a4a2c2 --- diff --git a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSAudioDevice.cs b/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSAudioDevice.cs deleted file mode 100755 index 6c5fb13..0000000 --- a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSAudioDevice.cs +++ /dev/null @@ -1,250 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using NUnit.Framework; -using Xamarin.Forms; - -namespace Tizen.Multimedia.Tests -{ - [TestFixture] - [Description("Testing Tizen.Multimedia.AudioDevice class")] - public static class AudioDeviceTests - { - public const string LogTag = "TizenTest.Multimedia.AudioDevice"; - private static TestPage _testPage = TestPage.GetInstance(); - private static IEnumerable _deviceList; - private static Button _button_1; - private static TestOperations _operation; - - enum TestOperations - { - AudioJack = 1, - Bluetooth, - InputOutput - } - - public static void InitTests() - { - CreateButton(); - } - - [SetUp] - public static void Init() - { - Tizen.Log.Info(LogTag, "AudioDevice Test Init"); - } - - [TearDown] - public static void Destroy() - { - Tizen.Log.Info(LogTag, "AudioDevice Test Destroy"); - } - - private static void CreateButton() - { - _button_1 = new Button() { - Text = "", - HorizontalOptions = LayoutOptions.CenterAndExpand, - VerticalOptions = LayoutOptions.CenterAndExpand, - MinimumWidthRequest = 210, - MinimumHeightRequest = 45 - }; - - var layout = new StackLayout() { - HorizontalOptions = LayoutOptions.FillAndExpand, - VerticalOptions = LayoutOptions.Start, - Orientation = StackOrientation.Horizontal, - MinimumHeightRequest = 50, - Children = { - _button_1, - }, - Padding = new Thickness() { - Top = 250, - }, - }; - _button_1.Clicked += (sender, e) => { - switch(_operation) - { - case TestOperations.AudioJack: - { - _deviceList = AudioManager.GetCurrentDevices(AudioDeviceOptions.All); - for(int a = 0; a < 8; a = a + 1) - { - if(_deviceList.ElementAtOrDefault(a) == null) - { - Assert.True(false, "Audio Jack is not connected"); - ManualTest.Confirm(); - break; - } - if(AudioDeviceType.AudioJack == _deviceList.ElementAtOrDefault(a).Type) - { - ManualTest.Confirm(); - break; - } - } - Log.Info(LogTag, "AudioDevice Test Type finished"); - break; - } - case TestOperations.Bluetooth: - { - _deviceList = AudioManager.GetCurrentDevices(AudioDeviceOptions.All); - for(int a = 0; a < 8; a = a + 1) - { - if(_deviceList.ElementAtOrDefault(a) == null) - { - Assert.True(false, "Bluetooth is not connected"); - ManualTest.Confirm(); - break; - } - if(AudioDeviceType.Bluetooth == _deviceList.ElementAtOrDefault(a).Type) - { - ManualTest.Confirm(); - break; - } - } - Log.Info(LogTag, "AudioDevice Test Type finished"); - break; - } - case TestOperations.InputOutput: - { - _deviceList = AudioManager.GetCurrentDevices(AudioDeviceOptions.All); - for(int a = 0; a < 8; a = a + 1) - { - if(_deviceList.ElementAtOrDefault(a) == null) - { - Assert.True(false, "Audio Jack is not connected"); - ManualTest.Confirm(); - break; - } - if(AudioDeviceType.AudioJack == _deviceList.ElementAtOrDefault(a).Type) - { - if(AudioDeviceIoDirection.InputAndOutput == _deviceList.ElementAtOrDefault(a).IoDirection) - { - ManualTest.Confirm(); - break; - } else - { - Assert.True(false, "The IODirection of Audio Device is not input/output type"); - ManualTest.Confirm(); - break; - } - } - } - Log.Info(LogTag, "IODirection test of Audio Jack finished"); - break; - } - } - }; - _testPage.ExecuteTC(layout); - } - - [Test] - [Category("P1")] - [Description("Check whether the audio device type Audio Jack can be retrieved or not")] - [Property("SPEC", "Tizen.Multimedia.AudioDevice.Type.AudioJack A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Precondition(1, "Ensure Audio jack is disconnected from the device")] - [Step(1, "Click run TC")] - [Step(2, "Insert Audio jack to the device and click check status")] - public static async Task Type_GET_ENUM_AUDIOJACK() - { - Log.Info(LogTag, "AudioDevice Test Type starting"); - _operation = TestOperations.AudioJack; - InitTests(); - _button_1.Text = "Check Status"; - } - - [Test] - [Category("P1")] - [Description("Check whether the audio device type Bluetooth can be retrieved or not.")] - [Property("SPEC", "Tizen.Multimedia.AudioDevice.Type.Bluetooth A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Precondition(1, "Ensure Bluetooth is ON in both the devices and disconnected from the other device")] - [Step(1, "Click run TC")] - [Step(2, "Connect Bluetooth to the other device and click check status")] - public static async Task Type_GET_ENUM_BLUETOOTH() - { - Log.Info(LogTag, "AudioDevice Test Type starting"); - _operation = TestOperations.Bluetooth; - InitTests(); - _button_1.Text = "Check Status"; - } - - //[Test] - [Category("P1")] - [Description("AudioDevice Type Hdmi")] - [Property("SPEC", "Tizen.Multimedia.AudioDevice.Type.Hdmi A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Step(1, "TBD")] - public static async Task Type_GET_ENUM_HDMI() - { - Log.Info(LogTag, "AudioDevice Test Type starting"); - - /* TEST CODE - * Test HDMI type for AudioDevice. - */ - Assert.True(false, "[NA] Device does not have HDMI"); - Log.Info(LogTag, "AudioDevice Test Type finished"); - } - - //[Test] - [Category("P1")] - [Description("AudioDevice Type Forwarding")] - [Property("SPEC", "Tizen.Multimedia.AudioDevice.Type.Forwarding A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Step(1, "TBD")] - public static async Task Type_GET_ENUM_FORWARDING() - { - Log.Info(LogTag, "AudioDevice Test Type starting"); - - /* TEST CODE - * Test Forwarding type for AudioDevice. - */ - Assert.True(false, "[NA] Fail, don't have the device to test it."); - Log.Info(LogTag, "AudioDevice Test Type finished"); - } - - //[Test] - [Category("P1")] - [Description("AudioDevice Type UsbAudio")] - [Property("SPEC", "Tizen.Multimedia.AudioDevice.Type.UsbAudio A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Step(1, "TBD")] - public static async Task Type_GET_ENUM_USBAUDIO() - { - Log.Info(LogTag, "AudioDevice Test Type starting"); - /* TEST CODE - * Test Usb Audio type for AudioDevice. - */ - Assert.True(false, "[NA] Fail, don't have the device to test it."); - Log.Info(LogTag, "AudioDevice Test Type finished"); - } - - [Test] - [Category("P1")] - [Description("Check whether the IODirection for audio device type Audio Jack can be retrieved or not")] - [Property("SPEC", "Tizen.Multimedia.AudioDevice.IODirection.InputOutput A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Step(1, "Click run TC")] - [Step(2, "Insert Audio jack to the device and click check status")] - public static async Task IODirection_GET_ENUM_INPUT_OUTPUT() - { - Log.Info(LogTag, "AudioDevice Test IoDirection starting"); - _operation = TestOperations.InputOutput; - InitTests(); - _button_1.Text = "Check Status"; - } - } -} diff --git a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSAudioDeviceConnectionChangedEventArgs.cs b/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSAudioDeviceConnectionChangedEventArgs.cs deleted file mode 100755 index 7c3fa0c..0000000 --- a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSAudioDeviceConnectionChangedEventArgs.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace Tizen.Multimedia.Tests -{ - [TestFixture] - [Description("Testing Tizen.Multimedia.AudioDeviceConnectionChangedEventArgs class")] - public static class AudioDeviceConnectionChangedEventArgsTests - { - private const string LogTag = "TizenTest.Multimedia.AudioDeviceConnectionChangedEventArgs"; - - [SetUp] - public static void Init() - { - Log.Info(LogTag, "AudioDeviceConnectionChangedEventArgs Test Init"); - } - - [TearDown] - public static void Destroy() - { - Log.Info(LogTag, "AudioDeviceConnectionChangedEventArgs Test Destroy"); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check the device connection in callback")] - [Property("SPEC", "Tizen.Multimedia.AudioDeviceConnectionChangedEventArgs.Device A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Precondition(1, "Ensure audio jack is disconnected from the device")] - [Step(1, "Click run TC")] - [Step(2, "Insert audio jack to the device")] - public static async Task Device_PROPERTY_READ_ONLY() - { - EventHandler handler = (s, e) => { - Tizen.Log.Info(LogTag, "[TestCase][AudioDeviceConnectionChangedEventArgs][Device] " + e.Device.Type); - Assert.AreEqual((int)e.Device.Type, (int)AudioDeviceType.AudioJack, "Unexpected device"); - ManualTest.Confirm(); - }; - Log.Info(LogTag, "AudioDeviceConnectionChangedEventArgs Test Device read starting"); - AudioManager.DeviceConnectionChanged += handler; - await ManualTest.WaitForConfirm(); - AudioManager.DeviceConnectionChanged -= handler; - } - - public static void AudioDeviceConnectionChangedConnected(object sender, AudioDeviceConnectionChangedEventArgs args) - { - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check whether audio device is connected or not.")] - [Property("SPEC", "Tizen.Multimedia.AudioDeviceConnectionChangedEventArgs.IsConnected A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Precondition(1, "Ensure audio jack is disconnected from the device")] - [Step(1, "Click run TC")] - [Step(2, "Insert audio jack to the device")] - public static async Task IsConnected_PROPERTY_READ_ONLY() - { - EventHandler handler = (s, e) => { - Tizen.Log.Info(LogTag, "[TestCase][AudioDeviceConnectionChangedEventArgs][IsConnected] " + e.IsConnected); - Assert.True(e.IsConnected, "AudioDevice IsConnected is false"); - ManualTest.Confirm(); - }; - Log.Info(LogTag, "AudioDeviceConnectionChangedEventArgs Test IsConnected read starting"); - AudioManager.DeviceConnectionChanged += handler; - await ManualTest.WaitForConfirm(); - AudioManager.DeviceConnectionChanged -= handler; - } - } -} - - diff --git a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSAudioDevicePropertyChangedEventArgs.cs b/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSAudioDevicePropertyChangedEventArgs.cs deleted file mode 100755 index 8ef2764..0000000 --- a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSAudioDevicePropertyChangedEventArgs.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace Tizen.Multimedia.Tests -{ - [TestFixture] - [Description("Testing Tizen.Multimedia.AudioDevicePropertyChangedEventArgs class")] - public static class AudioDevicePropertyChangedEventArgsTests - { - private const string LogTag = "TizenTest.Multimedia.AudioDevicePropertyChangedEventArgs"; - - [SetUp] - public static void Init() - { - Log.Info(LogTag, "AudioDevicePropertyChangedEventArgs Test Init"); - } - - [TearDown] - public static void Destroy() - { - Log.Info(LogTag, "AudioDevicePropertyChangedEventArgs Test Destroy"); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check audio device property changed callback is invoked with the correct device value.")] - [Property("SPEC", "Tizen.Multimedia.AudioDevicePropertyChangedEventArgs.Device A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Precondition(1, "Ensure Audio jack is disconnected from the device")] - [Step(1, "Click run TC")] - [Step(2, "Insert Audio jack to the device")] - public static async Task Device_PROPERTY_READ_ONLY() - { - EventHandler handler = (s, e) => { - Tizen.Log.Info(LogTag, "[TestCase][AudioDevicePropertyChangedEventArgs][Device] " + e.Device.Type); - Assert.AreEqual((int)e.Device.Type, (int)AudioDeviceType.AudioJack, "Unexpected device"); - ManualTest.Confirm(); - }; - - // TEST: Check device property event - Log.Info(LogTag, "AudioDevicePropertyChangedEventArgs Test Device read starting"); - AudioManager.DevicePropertyChanged += handler; - await ManualTest.WaitForConfirm(); - AudioManager.DevicePropertyChanged -= handler; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check audio device property changed callback is invoked when audio device's state is changed.")] - [Property("SPEC", "Tizen.Multimedia.AudioDevicePropertyChangedEventArgs.ChangedInfo A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Precondition(1, "Ensure Audio jack is disconnected from the device")] - [Step(1, "Click run TC")] - [Step(2, "Insert Audio jack to the device")] - public static async Task ChangedInfo_CHECK_ENUM_STATE() - { - EventHandler handler = (s, e) => { - Assert.AreEqual((int)e.ChangedInfo, (int)AudioDeviceProperty.State, "Incorrect property info "); - Tizen.Log.Info(LogTag, "[TestCase][AudioDevicePropertyChangedEventArgs][ChangedInfo] " + e.ChangedInfo); - ManualTest.Confirm(); - }; - - // TEST: Check device property event ChangedInfo(State) - Log.Info(LogTag, "AudioDevicePropertyChangedEventArgs Test ChangedInfo read starting"); - AudioManager.DevicePropertyChanged += handler; - await ManualTest.WaitForConfirm(); - AudioManager.DevicePropertyChanged -= handler; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check audio device property changed callback is invoked when audio device's IO direction is changed.")] - [Property("SPEC", "Tizen.Multimedia.AudioDevicePropertyChangedEventArgs.ChangedInfo A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Precondition(1, "Ensure Audio jack is disconnected from the device")] - [Step(1, "Click run TC")] - [Step(2, "Insert Audio jack to the device")] - public static async Task ChangedInfo_CHECK_ENUM_IO_DIRECTION() - { - EventHandler handler = (s, e) => { - Assert.AreEqual((int)e.ChangedInfo, (int)AudioDeviceProperty.IoDirection, "Incorrect property info "); - Tizen.Log.Info(LogTag, "[TestCase][AudioDevicePropertyChangedEventArgs][ChangedInfo] " + e.ChangedInfo); - ManualTest.Confirm(); - }; - - // TEST: Check device property event ChangedInfo(IoDirection) - Log.Info(LogTag, "AudioDevicePropertyChangedEventArgs Test ChangedInfo read starting"); - AudioManager.DevicePropertyChanged += handler; - await ManualTest.WaitForConfirm(); - AudioManager.DevicePropertyChanged -= handler; - } - } -} diff --git a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSAudioManager.cs b/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSAudioManager.cs deleted file mode 100755 index a5d9faf..0000000 --- a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSAudioManager.cs +++ /dev/null @@ -1,307 +0,0 @@ -using System; -using System.Threading.Tasks; -using NUnit.Framework; - -namespace Tizen.Multimedia.Tests -{ - [TestFixture] - [Description("Testing Tizen.Multimedia.AudioManager class")] - public static class AudioManagerTests - { - private const string LogTag = "TizenTest.Multimedia.AudioManager"; - - [SetUp] - public static void Init() - { - Tizen.Log.Info(LogTag, "AudioManager Test Init"); - } - - [TearDown] - public static void Destroy() - { - Tizen.Log.Info(LogTag, "AudioManager Test Destroy"); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check Device connection changed event")] - [Property("SPEC", "Tizen.Multimedia.AudioManager.DeviceConnectionChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Precondition(1, "Ensure audio jack is disconnected from the device")] - [Step(1, "Click run TC")] - [Step(2, "Insert audio jack to the device")] - public static async Task DeviceConnectionChanged_MANUAL_CHECK_CONNECTION() - { - EventHandler handler = (s, e) => { - Tizen.Log.Info(LogTag, "[TestCase][DeviceConnectionChanged][Device] " + e.Device.Type); - Assert.AreEqual((int)e.Device.Type, (int)AudioDeviceType.AudioJack, "Unexpected device"); - ManualTest.Confirm(); - }; - - // TEST: Check if the device connection event callback is invoked - AudioManager.DeviceConnectionChanged += handler; - await ManualTest.WaitForConfirm(); - AudioManager.DeviceConnectionChanged -= handler; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check Activated device connection changed event")] - [Property("SPEC", "Tizen.Multimedia.AudioManager.ActivatedDeviceConnectionChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Step(1, "TBD")] - public static async Task ActivatedDeviceConnectionChanged_MANUAL_CHECK_ACTIVATED() - { - // TODO: Fill this when we know how to trigger this event - // TEST: Check if the activated device connection callback is invoked. - Assert.True(false, "[NA] Fail, don't know how to trigger event."); - - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check deactivated device connection changed event")] - [Property("SPEC", "Tizen.Multimedia.AudioManager.DeactivatedDeviceConnectionChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Precondition(1, "Ensure audio jack is disconnected from the device")] - [Step(1, "Click run TC")] - [Step(2, "Insert audio jack to the device")] - public static async Task DeactivatedDeviceConnectionChanged_MANUAL_CHECK_DEACTIVATED() - { - EventHandler handler = (s, e) => { - Tizen.Log.Info(LogTag, "[TestCase][DeactivatedDeviceConnectionChanged][Device] " + e.Device.Type); - Assert.AreEqual((int)e.Device.Type, (int)AudioDeviceType.AudioJack, "Unexpected device"); - ManualTest.Confirm(); - }; - - // TEST: Check if the device deactivate event callback is invoked - AudioManager.DeactivatedDeviceConnectionChanged += handler; - await ManualTest.WaitForConfirm(); - AudioManager.DeactivatedDeviceConnectionChanged -= handler; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check external device connection changed event")] - [Property("SPEC", "Tizen.Multimedia.AudioManager.ExternalDeviceConnectionChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Precondition(1, "Ensure audio jack is disconnected from the device")] - [Step(1, "Click run TC")] - [Step(2, "Insert audio jack to the device")] - public static async Task ExternalDeviceConnectionChanged_MANUAL_CHECK_EXTERNAL_DEVICE() - { - EventHandler handler = (s, e) => { - Tizen.Log.Info(LogTag, "[TestCase][ExternalDeviceConnectionChanged][Device] " + e.Device.Type); - Assert.AreEqual((int)e.Device.Type, (int)AudioDeviceType.AudioJack, "Unexpected device"); - ManualTest.Confirm(); - }; - - // TEST: Check if the external device connection event callback is invoked - AudioManager.ExternalDeviceConnectionChanged += handler; - await ManualTest.WaitForConfirm(); - AudioManager.ExternalDeviceConnectionChanged -= handler; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check internal device connection changed event")] - [Property("SPEC", "Tizen.Multimedia.AudioManager.InternalDeviceConnectionChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Step(1, "TBD")] - public static async Task InternalDeviceConnectionChanged_MANUAL_CHECK_INTERNAL_DEVICE() - { - // TODO: Fill this when we know how to trigger this event - // TEST: Check if the internal device connection callback is invoked. - Assert.True(false, "[NA] Fail, don't know how to trigger event."); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check input device connection changed event")] - [Property("SPEC", "Tizen.Multimedia.AudioManager.InputDeviceConnectionChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Step(1, "TBD")] - public static async Task InputDeviceConnectionChanged_MANUAL_CHECK_INPUT_DEVICE() - { - // TODO: Fill this when we know how to trigger this event - Assert.True(false, "[NA] Fail, don't know how to trigger event."); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check output device connection changed event")] - [Property("SPEC", "Tizen.Multimedia.AudioManager.OutputDeviceConnectionChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Precondition(1, "Ensure audio jack is disconnected from the device")] - [Step(1, "Click run TC")] - [Step(2, "Insert audio jack to the device")] - public static async Task OutputDeviceConnectionChanged_MANUAL_CHECK_OUTPUT_DEVICE() - { - EventHandler handler = (s, e) => { - Tizen.Log.Info(LogTag, "[TestCase][OutputDeviceConnectionChanged][Device] " + e.Device.Type); - Assert.AreEqual((int)e.Device.Type, (int)AudioDeviceType.AudioJack, "Unexpected device"); - ManualTest.Confirm(); - }; - - // TEST: Check if the output device connection event callback is invoked - AudioManager.OutputDeviceConnectionChanged += handler; - await ManualTest.WaitForConfirm(); - AudioManager.OutputDeviceConnectionChanged -= handler; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check device property changed event")] - [Property("SPEC", "Tizen.Multimedia.AudioManager.DevicePropertyChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Precondition(1, "Ensure Device is in Vibrate or Mute mode by changing it in Notification bar.")] - [Step(1, "Click run TC")] - [Step(2, "Change the device from Vibrate mode to Sound mode in Notification bar.")] - public static async Task DevicePropertyChanged_MANUAL_CHECK_PROPERTY() - { - EventHandler handler = (s, e) => { - Tizen.Log.Info(LogTag, "[TestCase][AudioDevicePropertyChangedEventArgs][Device] " + e.Device.Type); - Assert.AreEqual((int)e.Device.Type, (int)AudioDeviceType.BuiltinSpeaker, "Unexpected device"); - ManualTest.Confirm(); - }; - - // TEST: Check if the device property event callback is invoked - AudioManager.DevicePropertyChanged += handler; - await ManualTest.WaitForConfirm(); - AudioManager.DevicePropertyChanged -= handler; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check activated device property changed event")] - [Property("SPEC", "Tizen.Multimedia.AudioManager.ActivatedDevicePropertyChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Step(1, "TBD")] - public static async Task ActivatedDevicePropertyChanged_MANUAL_CHECK_ACTIVATED() - { - /* TEST CODE */ - // TODO: Fill this when we know how to trigger this event - Assert.True(false, "[NA] Fail, don't know how to trigger event.\t"); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check deactivated device property changed event")] - [Property("SPEC", "Tizen.Multimedia.AudioManager.DeactivatedDevicePropertyChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Precondition(1, "Ensure Device is in Vibrate or Mute mode by changing it in Notification bar.")] - [Step(1, "Click run TC")] - [Step(2, "Change the device from Vibrate mode to Sound mode in Notification bar.")] - public static async Task DeactivatedDevicePropertyChanged_MANUAL_CHECK_DEACTIVATED() - { - EventHandler handler = (s, e) => { - Tizen.Log.Info(LogTag, "[TestCase][AudioDevicePropertyChangedEventArgs][Device] " + e.Device.Type); - Assert.AreEqual((int)e.Device.Type, (int)AudioDeviceType.BuiltinSpeaker, "Unexpected device"); - ManualTest.Confirm(); - }; - - // TEST: Check if the deactivated device property event callback is invoked - AudioManager.DeactivatedDevicePropertyChanged += handler; - await ManualTest.WaitForConfirm(); - AudioManager.DeactivatedDevicePropertyChanged -= handler; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check external device property changed event")] - [Property("SPEC", "Tizen.Multimedia.AudioManager.ExternalDevicePropertyChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Step(1, "TBD")] - public static async Task ExternalDevicePropertyChanged_MANUAL_CHECK_EXTERNAL_DEVICE_PROPERTY() - { - /* TEST CODE */ - // TODO: Fill this when we know how to trigger this event - Assert.True(false, "[NA] Fail, don't know how to trigger event."); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check internal device property changed event")] - [Property("SPEC", "Tizen.Multimedia.AudioManager.InternalDevicePropertyChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Precondition(1, "Ensure Device is in Vibrate or Mute mode by changing it in Notification bar.")] - [Step(1, "Click run TC")] - [Step(2, "Change the device from Vibrate mode to Sound mode in Notification bar.")] - public static async Task InternalDevicePropertyChanged_MANUAL_CHECK_INTERNAL_DEVICE_PROPERTY() - { - EventHandler handler = (s, e) => { - Tizen.Log.Info(LogTag, "[TestCase][AudioDevicePropertyChangedEventArgs][Device] " + e.Device.Type); - Assert.AreEqual((int)e.Device.Type, (int)AudioDeviceType.BuiltinSpeaker, "Unexpected device"); - ManualTest.Confirm(); - }; - - // TEST: Check if the deactivated device property event callback is invoked - AudioManager.InternalDevicePropertyChanged += handler; - await ManualTest.WaitForConfirm(); - AudioManager.InternalDevicePropertyChanged -= handler; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check input device property changed event")] - [Property("SPEC", "Tizen.Multimedia.AudioManager.InputDevicePropertyChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Step(1, "TBD")] - public static async Task InputDevicePropertyChanged_MANUAL_CHECK_INPUT_DEVICE_PROPERTY() - { - /* TEST CODE */ - // TODO: Fill this when we know how to trigger this event - Assert.True(false, "[NA] Fail, don't know how to trigger event."); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Check output device property changed event")] - [Property("SPEC", "Tizen.Multimedia.AudioManager.OutputDevicePropertyChanged E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Ankur Garg, ankur29.garg@samsung.com")] - [Precondition(1, "Ensure Device is in Vibrate or Mute mode by changing it in Notification bar.")] - [Step(1, "Click run TC")] - [Step(2, "Change the device from Vibrate mode to Sound mode in Notification bar.")] - public static async Task OutputDevicePropertyChanged_MANUAL_CHECK_OUTPUT_DEVICE_PROPERTY() - { - EventHandler handler = (s, e) => { - Tizen.Log.Info(LogTag, "[TestCase][AudioDevicePropertyChangedEventArgs][Device] " + e.Device.Type); - Assert.AreEqual((int)e.Device.Type, (int)AudioDeviceType.BuiltinSpeaker, "Unexpected device"); - ManualTest.Confirm(); - }; - - // TEST: Check if the deactivated device property event callback is invoked - AudioManager.OutputDevicePropertyChanged += handler; - await ManualTest.WaitForConfirm(); - AudioManager.OutputDevicePropertyChanged -= handler; - } - } -} diff --git a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSDisplay.cs b/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSDisplay.cs deleted file mode 100755 index ccc0ac8..0000000 --- a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSDisplay.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Threading.Tasks; -using NUnit.Framework; - -namespace Tizen.Multimedia.Tests -{ - [TestFixture] - [Description("Testing Tizen.Multimedia.Display class")] - public static class DisplayTests - { - private const string LogTag = "TizenTest.Multimedia.Display"; - - [SetUp] - public static void Init() - { - Log.Info(LogTag, "Display Test Init"); - } - - [TearDown] - public static void Destroy() - { - Log.Info(LogTag, "Display Test Destroy"); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test to check Display Mode of Player during playback")] - [Property("SPEC", "Tizen.Multimedia.Display.Mode A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Precondition(1, "N/A")] - [Step(1, "Click run TC")] - [Postcondition(1, "N/A")] - public static async Task Mode_MANUAL_TEST_DISPLAY() - { - Assert.True(false, "[NA] VideoView is unavailable yet."); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test to check Display Rotation of Player")] - [Property("SPEC", "Tizen.Multimedia.Display.Rotation A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Precondition(1, "N/A")] - [Step(1, "Click run TC")] - [Postcondition(1, "N/A")] - public static async Task Rotation_MANUAL_TEST_DISPLAY() - { - Assert.True(false, "[NA] VideoView is unavailable yet."); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test to check if Display is visible during playback")] - [Property("SPEC", "Tizen.Multimedia.Display.Visible A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Precondition(1, "N/A")] - [Step(1, "Click run TC")] - [Postcondition(1, "N/A")] - public static async Task Visible_MANUAL_TEST_DISPLAY() - { - Assert.True(false, "[NA] VideoView is unavailable yet."); - } - } -} diff --git a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSPlayer.cs b/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSPlayer.cs deleted file mode 100755 index 59c4bb8..0000000 --- a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSPlayer.cs +++ /dev/null @@ -1,452 +0,0 @@ -using System.Threading.Tasks; -using NUnit.Framework; -using Xamarin.Forms; - -namespace Tizen.Multimedia.Tests -{ - [TestFixture] - [Description("Testing Tizen.Multimedia.Player class")] - public static class PlayerTests - { - private const string LogTag = "TizenTest.Multimedia.Player"; - private const string TestSource = "/opt/usr/home/owner/share/res/test.mp3"; - private static Tizen.Multimedia.Player _player; - private static TestPage _testPage = TestPage.GetInstance(); - private static Button _button_1; - private static Button _button_2; - private static Button _button_3; - private static TestOperations _operation; - - enum TestOperations - { - Start = 1, - Pause, - Stop, - Mute, - Loop, - LVolume, - RVolume} - - ; - - public static void InitTests() - { - CreateButton(); - _player = new Player(); - MediaSource src = new MediaUriSource(TestSource); - _player.SetSource(src); - } - - [SetUp] - public static void Init() - { - Log.Info(LogTag, "Player Test Init"); - } - - [TearDown] - public static void Destroy() - { - Log.Info(LogTag, "Player Test Destroy"); - } - - private static async Task StartTest(int val) - { - /** - * Step1 : click start player starts - * Step2 : Plays for 5 seconds and then stops. - */ - if(val == 1) - { - await _player.PrepareAsync(); - _player.Start(); - await Task.Delay(5000); - _player.Stop(); - } - } - - private static async Task PauseTest(int val) - { - /** - * Step1 : click start player starts - * Step2 : click pauses player pauses - * Step3 : click resume player starts from where it paused for 5 seconds - */ - if(val == 1) - { - await _player.PrepareAsync(); - _player.Start(); - } - if(val == 2) - { - _player.Pause(); - } - if(val == 3) - { - _player.Start(); - await Task.Delay(5000); - _player.Stop(); - } - } - - private static async Task StopTest(int val) - { - /** - * Step1 : click start player starts - * Step2 : click stop player stops - * Step3 : click resume player starts from beginning for 5 seconds - */ - if(val == 1) - { - await _player.PrepareAsync(); - _player.Start(); - } - if(val == 2) - { - _player.Stop(); - } - if(val == 3) - { - _player.Start(); - await Task.Delay(5000); - } - } - - private static async Task MuteTest(int val) - { - /** - * Step1 : click start player starts and plays for 10 seconds and then stops. - * Step2 : click mute player is muted - * Step3 : click unmute player is unmuted - */ - if(val == 1) - { - await _player.PrepareAsync(); - _player.Start(); - await Task.Delay(10000); - _player.Stop(); - } - if(val == 2) - { - _player.Mute = true; - } - if(val == 3) - { - _player.Mute = false; - } - } - - private static async Task LoopTest(int val) - { - /** - * Step1 : click start player starts and stops after 80 seconds - * Step2 : click loop music will start again after the end of music. - * Step3 : click unloop music will not start again. - */ - if(val == 1) - { - await _player.PrepareAsync(); - _player.Start(); - await Task.Delay(80000); - _player.Stop(); - } - if(val == 2) - { - _player.IsLooping = true; - } - if(val == 3) - { - _player.IsLooping = false; - } - } - - private static async Task LVolumeTest(int val) - { - /** - * Step1 : click start player starts and plays for 30 seconds - * Step2 : click +Lvol and volume will increased by 20% of left speaker. - * Step3 : click -Lvol and volume will decreased by 20% of left speaker. - */ - if(val == 1) - { - await _player.PrepareAsync(); - _player.Start(); - await Task.Delay(30000); - _player.Stop(); - } - if(val == 2) - { - _player.LeftVolume += 0.2f; - if(_player.LeftVolume > 1.0f) - _player.LeftVolume = 1.0f; - } - if(val == 3) - { - _player.LeftVolume -= 0.2f; - if(_player.LeftVolume < 0.0f) - _player.LeftVolume = 0.0f; - } - } - - private static async Task RVolumeTest(int val) - { - /** - * Step1 : click start player starts and plays for 30 seconds - * Step2 : click +Rvol and volume will increased by 20% of right speaker. - * Step3 : click -Rvol and volume will decreased by 20% of right speaker. - */ - if(val == 1) - { - await _player.PrepareAsync(); - _player.Start(); - await Task.Delay(30000); - _player.Stop(); - } - if(val == 2) - { - _player.RightVolume += 0.2f; - if(_player.RightVolume > 1.0f) - _player.RightVolume = 1.0f; - } - if(val == 3) - { - _player.RightVolume -= 0.2f; - if(_player.RightVolume < 0.0f) - _player.RightVolume = 0.0f; - } - } - - private static async Task taskselect(int val) - { - switch(_operation) - { - case TestOperations.Start: - await StartTest(val); - break; - case TestOperations.Pause: - await PauseTest(val); - break; - case TestOperations.Stop: - await StopTest(val); - break; - case TestOperations.Mute: - await MuteTest(val); - break; - case TestOperations.Loop: - await LoopTest(val); - break; - case TestOperations.LVolume: - await LVolumeTest(val); - break; - case TestOperations.RVolume: - await RVolumeTest(val); - break; - } - } - - private static void CreateButton() - { - _button_1 = new Button() { - Text = "", - HorizontalOptions = LayoutOptions.CenterAndExpand, - VerticalOptions = LayoutOptions.CenterAndExpand, - MinimumWidthRequest = 210, - MinimumHeightRequest = 45 - }; - _button_2 = new Button() { - Text = "", - HorizontalOptions = LayoutOptions.CenterAndExpand, - VerticalOptions = LayoutOptions.CenterAndExpand, - MinimumWidthRequest = 210, - MinimumHeightRequest = 45 - }; - _button_3 = new Button() { - Text = "", - HorizontalOptions = LayoutOptions.CenterAndExpand, - VerticalOptions = LayoutOptions.CenterAndExpand, - MinimumWidthRequest = 210, - MinimumHeightRequest = 45 - }; - var layout = new StackLayout() { - HorizontalOptions = LayoutOptions.FillAndExpand, - VerticalOptions = LayoutOptions.Start, - Orientation = StackOrientation.Horizontal, - MinimumHeightRequest = 50, - Children = { - _button_1, - _button_2, - _button_3, - }, - Padding = new Thickness() { - Top = 250, - }, - }; - _button_1.Clicked += async (sender, e) => - { - await taskselect(1); - }; - _button_2.Clicked += async (sender, e) => - { - await taskselect(2); - }; - _button_3.Clicked += async (sender, e) => - { - await taskselect(3); - }; - _testPage.ExecuteTC(layout); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test to check playback start operation")] - [Property("SPEC", "Tizen.Multimedia.Player.Start M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MCST")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Precondition(1, "N/A")] - [Step(1, "Click run TC and click start button")] - [Step(2, "Check if playback starts")] - [Postcondition(1, "N/A")] - public static async Task Start_MANUAL_TEST_START() - { - _operation = TestOperations.Start; - InitTests(); - _button_1.Text = "Start"; - await ManualTest.WaitForConfirm(); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test to check playback pause/resume operation")] - [Property("SPEC", "Tizen.Multimedia.Player.Pause M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MCST")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Precondition(1, "N/A")] - [Step(1, "Click run TC and click start button")] - [Step(2, "Check if playback starts")] - [Step(3, "Click pause button and check if playback pauses")] - [Step(4, "Click resume button and check if playback resumes")] - [Postcondition(1, "N/A")] - public static async Task Pause_MANUAL_TEST_RESUME() - { - _operation = TestOperations.Pause; - InitTests(); - _button_1.Text = "Start"; - _button_2.Text = "Pause"; - _button_3.Text = "Resume"; - await ManualTest.WaitForConfirm(); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test to check playback stop operation")] - [Property("SPEC", "Tizen.Multimedia.Player.Stop M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MCST")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Precondition(1, "N/A")] - [Step(1, "Click run TC and click start button")] - [Step(2, "Check if playback starts")] - [Step(3, "Click stop button and check if playback stops")] - [Step(4, "Click start2 button and check if playback starts from beginning")] - [Postcondition(1, "N/A")] - public static async Task Stop_MANUAL_TEST_STARTAGAIN() - { - _operation = TestOperations.Stop; - InitTests(); - _button_1.Text = "Start"; - _button_2.Text = "Stop"; - _button_3.Text = "Start2"; - await ManualTest.WaitForConfirm(); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test to check mute operation")] - [Property("SPEC", "Tizen.Multimedia.Player.Mute A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PCST")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Precondition(1, "N/A")] - [Step(1, "Click run TC and click mute button after starting player")] - [Step(2, "Check if player is muted")] - [Step(3, "Click unmute button and check if player is unmuted")] - [Postcondition(1, "N/A")] - public static async Task Mute_MANUAL_TEST() - { - _operation = TestOperations.Mute; - InitTests(); - _button_1.Text = "Start"; - _button_2.Text = "Mute"; - _button_3.Text = "UnMute"; - await ManualTest.WaitForConfirm(); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test to check loop operation")] - [Property("SPEC", "Tizen.Multimedia.Player.Loop A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PCST")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Precondition(1, "N/A")] - [Step(1, "Click run TC and click start, player starts and stops after 80 seconds")] - [Step(2, "Click loop button after starting player")] - [Step(2, "Check if player is looping")] - [Step(3, "Click unloop button and check if player is not looping")] - [Postcondition(1, "N/A")] - public static async Task Loop_MANUAL_TEST() - { - _operation = TestOperations.Loop; - InitTests(); - _button_1.Text = "Start"; - _button_2.Text = "Loop"; - _button_3.Text = "UnLoop"; - await ManualTest.WaitForConfirm(); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test to check left volume")] - [Property("SPEC", "Tizen.Multimedia.Player.LeftVolume A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PCST")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Precondition(1, "N/A")] - [Step(1, "Click run TC and click Lvol+ button after starting player")] - [Step(2, "Check if left volume is increasing")] - [Step(3, "Click Lvol- button and check if left volume is decreasing")] - [Postcondition(1, "N/A")] - public static async Task LeftVolume_MANUAL_TEST() - { - _operation = TestOperations.LVolume; - InitTests(); - _button_1.Text = "Start"; - _button_2.Text = "Lvol+"; - _button_3.Text = "Lvol-"; - await ManualTest.WaitForConfirm(); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test to check Right Volume")] - [Property("SPEC", "Tizen.Multimedia.Player.RightVolume A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PCST")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Precondition(1, "N/A")] - [Step(1, "Click run TC and click Rvol+ button after starting player")] - [Step(2, "Check if right volume is increasing")] - [Step(3, "Click Rvol- button and check if right volume is decreasing")] - [Postcondition(1, "N/A")] - public static async Task RightVolume_MANUAL_TEST() - { - _operation = TestOperations.RVolume; - InitTests(); - _button_1.Text = "Start"; - _button_2.Text = "Rvol+"; - _button_3.Text = "Rvol-"; - await ManualTest.WaitForConfirm(); - } - } -} diff --git a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSRecorder.cs b/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSRecorder.cs deleted file mode 100755 index a559f03..0000000 --- a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSRecorder.cs +++ /dev/null @@ -1,573 +0,0 @@ -using System; -using System.Threading.Tasks; -using NUnit.Framework; -using Xamarin.Forms; - -namespace Tizen.Multimedia.Tests -{ - [TestFixture] - [Description("Tizen.Multimedia.Recorder Test class for Audio and Video recording.")] - public class RecorderTests - { - private static Tizen.Multimedia.Recorder _recorder; - private static string _filePath = "/opt/usr/home/owner/share/res/audiosample.3gp"; - private static RecorderFileFormat _fileFormat = RecorderFileFormat.ThreeGp; - private static RecorderAudioCodec _audioCodec = RecorderAudioCodec.Aac; - private static TestPage _testPage = TestPage.GetInstance(); - private static Button _button_1; - private static Button _button_2; - private static Button _button_3; - private static Button _button_4; - private static Boolean _startFlag = true; - private const string LogTag = "TizenTest.Multimedia.RecorderManual"; - private static Player _player; - - [SetUp] - public static void Init() - { - _recorder = new Tizen.Multimedia.Recorder(); - _player = new Tizen.Multimedia.Player(); - } - - [TearDown] - public static void Destroy() - { - _recorder = null; - GC.Collect(); - } - - private static void InitRecorder() - { - _recorder.AudioCodec = _audioCodec; - _recorder.FileFormat = _fileFormat; - _recorder.FilePath = _filePath; - } - - private static void CreateButton() - { - _button_1 = new Button() { - Text = "Record", - HorizontalOptions = LayoutOptions.CenterAndExpand, - VerticalOptions = LayoutOptions.CenterAndExpand, - MinimumWidthRequest = 160, - MinimumHeightRequest = 45 - }; - _button_2 = new Button() { - Text = "Stop and save", - HorizontalOptions = LayoutOptions.CenterAndExpand, - VerticalOptions = LayoutOptions.CenterAndExpand, - MinimumWidthRequest = 160, - MinimumHeightRequest = 45 - }; - _button_3 = new Button() { - Text = "Pause", - HorizontalOptions = LayoutOptions.CenterAndExpand, - VerticalOptions = LayoutOptions.CenterAndExpand, - MinimumWidthRequest = 160, - MinimumHeightRequest = 45 - }; - _button_4 = new Button() { - Text = "Play", - HorizontalOptions = LayoutOptions.CenterAndExpand, - VerticalOptions = LayoutOptions.CenterAndExpand, - MinimumWidthRequest = 160, - MinimumHeightRequest = 45 - }; - - - var layout = new StackLayout() { - HorizontalOptions = LayoutOptions.FillAndExpand, - VerticalOptions = LayoutOptions.Start, - Orientation = StackOrientation.Horizontal, - MinimumHeightRequest = 120, - Children = { - _button_1, - _button_2, - _button_3, - _button_4 - }, - Padding = new Thickness() { - Top = 0, - }, - }; - _button_1.Clicked += (sender, e) => { - Log.Info(LogTag, "**************** Button 1 clicked **************"); - if(_startFlag == true) { - try { - _recorder.Prepare(); - _recorder.Start(); - _startFlag = false; - } catch(Exception ex) { - Log.Info(LogTag, "**************** Prepare failed **************"); - ManualTest.Confirm(); - } - } else { - _recorder.Start(); - } - }; - _button_2.Clicked += (sender, e) => { - _recorder.Commit(); - _recorder.Unprepare(); - }; - _button_3.Clicked += (sender, e) => { - _recorder.Pause(); - _startFlag = false; - }; - _button_4.Clicked += (async(sender, e) => { - await Play_audio(); - }); - _testPage.ExecuteTC(layout); - } - - public static async Task Play_audio() - { - MediaSource src = new MediaUriSource(_recorder.FilePath); - - _player.SetSource(src); - await _player.PrepareAsync(); - _player.Start(); - await Task.Delay(12000); - _player.Stop(); - _player.Unprepare(); - - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Start method of the recorder.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.Start M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MCST")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing Play button.")] - [Postcondition(1, "NA")] - public static async Task Start_MANUAL_TEST() - { - _recorder.FileFormat = RecorderFileFormat.ThreeGp; - _recorder.AudioCodec = RecorderAudioCodec.Aac; - _recorder.FilePath = _filePath; - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Start method of the recorder.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.Commit M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MCST")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing play button.")] - [Postcondition(1, "NA")] - public static async Task Commit_MANUAL_TEST() - { - _recorder.FileFormat = RecorderFileFormat.ThreeGp; - _recorder.AudioCodec = RecorderAudioCodec.Aac; - _recorder.FilePath = _filePath; - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Start method of the recorder.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.Pause M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MCST")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Pause button, and pause the recording. ")] - [Step(4, "Click Record button to again start the recording.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing Play button.")] - [Postcondition(1, "NA")] - public static async Task Pause_MANUAL_TEST() - { - _recorder.FileFormat = RecorderFileFormat.ThreeGp; - _recorder.AudioCodec = RecorderAudioCodec.Aac; - _recorder.FilePath = _filePath; - CreateButton(); - _button_3.Text = "Pause"; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Amr AudioCodec.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.AudioCodec A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing Play button.")] - [Postcondition(1, "NA")] - public static async Task AudioCodec_AMR_MANUAL_TEST() - { - _recorder.AudioCodec = RecorderAudioCodec.Amr; - _recorder.FileFormat = RecorderFileFormat.ThreeGp; - _recorder.FilePath = _filePath; - - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Aac AudioCodec.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.AudioCodec A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing play button.")] - [Postcondition(1, "NA")] - public static async Task AudioCodec_AAC_MANUAL_TEST() - { - _recorder.AudioCodec = RecorderAudioCodec.Aac; - _recorder.FileFormat = RecorderFileFormat.ThreeGp; - _recorder.FilePath = _filePath; - - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Vorbis AudioCodec.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.AudioCodec A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing play button.")] - [Postcondition(1, "NA")] - public static async Task AudioCodec_VORBIS_MANUAL_TEST() - { - _recorder.AudioCodec = RecorderAudioCodec.Vorbis; - _recorder.FileFormat = RecorderFileFormat.Ogg; - _filePath = "/opt/usr/home/owner/share/res/audiosample.ogg"; - _recorder.FilePath = _filePath; - - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Pcm AudioCodec.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.AudioCodec A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing play button.")] - [Postcondition(1, "NA")] - public static async Task AudioCodec_PCM_MANUAL_TEST() - { - _recorder.AudioCodec = RecorderAudioCodec.Pcm; - _recorder.FileFormat = RecorderFileFormat.ThreeGp; - _filePath = "/opt/usr/home/owner/share/res/audiosample.3gp"; - _recorder.FilePath = _filePath; - - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Mp3 AudioCodec.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.AudioCodec A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing play button.")] - [Postcondition(1, "NA")] - public static async Task AudioCodec_MP3_MANUAL_TEST() - { - _recorder.AudioCodec = RecorderAudioCodec.Mp3; - _recorder.FileFormat = RecorderFileFormat.Mp4; - _filePath = "/opt/usr/home/owner/share/res/audiosample.mp4"; - _recorder.FilePath = _filePath; - - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test 3gp FileFormat.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.FileFormat A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing play button.")] - [Postcondition(1, "NA")] - public static async Task FileFormat_3GP_MANUAL_TEST() - { - _recorder.AudioCodec = RecorderAudioCodec.Aac; - _recorder.FileFormat = RecorderFileFormat.ThreeGp; - _filePath = "/opt/usr/home/owner/share/res/audiosample.3gp"; - _recorder.FilePath = _filePath; - - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Mp4 FileFormat.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.FileFormat A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing play button.")] - [Postcondition(1, "NA")] - public static async Task FileFormat_MP4_MANUAL_TEST() - { - _recorder.AudioCodec = RecorderAudioCodec.Mp3; - _recorder.FileFormat = RecorderFileFormat.Mp4; - _filePath = "/opt/usr/home/owner/share/res/audiosample.mp4"; - _recorder.FilePath = _filePath; - - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Amr FileFormat.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.FileFormat A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing play button.")] - [Postcondition(1, "NA")] - public static async Task FileFormat_AMR_MANUAL_TEST() - { - _recorder.AudioCodec = RecorderAudioCodec.Amr; - _recorder.FileFormat = RecorderFileFormat.Amr; - _filePath = "/opt/usr/home/owner/share/res/audiosample.amr"; - _recorder.FilePath = _filePath; - - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Adts FileFormat.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.FileFormat A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing play button.")] - [Postcondition(1, "NA")] - public static async Task FileFormat_ADTS_MANUAL_TEST() - { - _recorder.AudioCodec = RecorderAudioCodec.Aac; - _recorder.FileFormat = RecorderFileFormat.Adts; - _filePath = "/opt/usr/home/owner/share/res/audiosample."; - _recorder.FilePath = _filePath; - - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Ogg FileFormat.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.FileFormat A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing play button.")] - [Postcondition(1, "NA")] - public static async Task FileFormat_OGG_MANUAL_TEST() - { - _recorder.AudioCodec = RecorderAudioCodec.Vorbis; - _recorder.FileFormat = RecorderFileFormat.Ogg; - _filePath = "/opt/usr/home/owner/share/res/audiosample.ogg."; - _recorder.FilePath = _filePath; - - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test M2ts FileFormat.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.FileFormat A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing play button.")] - [Postcondition(1, "NA")] - public static async Task FileFormat_M2TS_MANUAL_TEST() - { - _recorder.AudioCodec = RecorderAudioCodec.Mp3; - _recorder.FileFormat = RecorderFileFormat.M2ts; - _filePath = "/opt/usr/home/owner/share/res/audiosample.mp3"; - _recorder.FilePath = _filePath; - - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Wav FileFormat.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.FileFormat A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRE")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing play button.")] - [Postcondition(1, "NA")] - public static async Task FileFormat_WAV_MANUAL_TEST() - { - _recorder.AudioCodec = RecorderAudioCodec.Pcm; - _recorder.FileFormat = RecorderFileFormat.Wav; - _filePath = "/opt/usr/home/owner/share/res/audiosample.wav"; - _recorder.FilePath = _filePath; - - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Mute Property with mute on.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.Mute A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing play button.")] - [Postcondition(1, "NA")] - public static async Task Mute_TRUE_MANUAL_TEST() - { - _recorder.AudioCodec = RecorderAudioCodec.Aac; - _recorder.FileFormat = RecorderFileFormat.ThreeGp; - _filePath = "/opt/usr/home/owner/share/res/audiosample.3gp"; - _recorder.Mute = true; - _recorder.FilePath = _filePath; - - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test Mute Property With mute off.")] - [Property("SPEC", "Tizen.Multimedia.Recorder.Mute A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRW")] - [Property("AUTHOR", "Vivek Ellur, vivek.ellur@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click Record button, and record your voice.")] - [Step(3, "Click Stop and save button.")] - [Step(4, "Check the recorded audiosample by pressing play button.")] - [Postcondition(1, "NA")] - public static async Task Mute_FALSE_MANUAL_TEST() - { - _recorder.AudioCodec = RecorderAudioCodec.Aac; - _recorder.FileFormat = RecorderFileFormat.ThreeGp; - _filePath = "/opt/usr/home/owner/share/res/audiosample.3gp"; - _recorder.Mute = false; - _recorder.FilePath = _filePath; - - CreateButton(); - _button_3.IsEnabled = false; - await ManualTest.WaitForConfirm(); - _startFlag = true; - } - } -} diff --git a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSSubtitle.cs b/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSSubtitle.cs deleted file mode 100755 index 8e0e46b..0000000 --- a/tct-suite-vs/Resource/Tizen.Multimedia.Manual.Tests/testcase/TSSubtitle.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Threading.Tasks; -using Tizen.UI; -using NUnit.Framework; - -namespace Tizen.Multimedia.Tests -{ - [TestFixture] - [Description("Testing Tizen.Multimedia.Subtitle class")] - public static class SubtitleTests - { - private const string LogTag = "TizenTest.Multimedia.Subtitle"; - - [SetUp] - public static void Init() - { - Log.Info(LogTag, "Subtitle Test Init"); - } - - [TearDown] - public static void Destroy() - { - Log.Info(LogTag, "Subtitle Test Destroy"); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Test to check Subtitles during playback")] - [Property("SPEC", "Tizen.Multimedia.Subtitle.Updated E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")] - [Precondition(1, "N/A")] - [Step(1, "Click run TC")] - [Step(2, "Click Subtitle button")] - [Step(3, "Check if Subtitles are visible")] - [Postcondition(1, "N/A")] - public static async Task Updated_MANUAL_TEST_SUBTITLE() - { - Assert.True(false, "[NA] VideoView is unavailable yet."); - } - } -}