From: Wootak Jung Date: Mon, 5 Aug 2019 07:13:19 +0000 (+0900) Subject: [Bluetooth][Non-ACR] Add pre-condition logic in TCs X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1918bcb54dc126ebdc2d2ea95f62eba597262576;p=test%2Ftct%2Fcsharp%2Fapi.git [Bluetooth][Non-ACR] Add pre-condition logic in TCs Change-Id: I48a16aa50591e545343d47e34304633a579cf6f2 --- diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSAdapterLeScanResultChangedEventArgs.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSAdapterLeScanResultChangedEventArgs.cs old mode 100755 new mode 100644 index df4c6e982..9bf97d1e5 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSAdapterLeScanResultChangedEventArgs.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSAdapterLeScanResultChangedEventArgs.cs @@ -35,7 +35,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public static async Task Result_PROPERTY_READ_ONLY() @@ -71,7 +71,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("Result_PROPERTY_READ_ONLY"); await ManualTest.WaitForConfirm(); } @@ -90,7 +90,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public static async Task DeviceData_PROPERTY_READ_ONLY() @@ -128,7 +128,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("DeviceData_PROPERTY_READ_ONLY"); await ManualTest.WaitForConfirm(); } diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothGattCharacteristic.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothGattCharacteristic.cs index 84eb7ad66..ea0365764 100644 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothGattCharacteristic.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothGattCharacteristic.cs @@ -21,6 +21,7 @@ namespace Tizen.Network.Bluetooth.Tests string svcUuid = "181D"; string charUuid = "2A20"; bool isClientConnected = false; + BluetoothLeDevice leDevice = null; [SetUp] public void Init() @@ -145,6 +146,12 @@ namespace Tizen.Network.Bluetooth.Tests Assert.IsInstanceOf(client, "[TestCase][ValueChanged_CHECK_EVENT] Failed"); Assert.IsNotNull(client, "Precondition failed: client instance should not be null"); + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + } + await client.ConnectAsync(true); isClientConnected = true; diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothGattClient.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothGattClient.cs index 41205cdb6..911b9a74e 100644 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothGattClient.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothGattClient.cs @@ -22,6 +22,7 @@ namespace Tizen.Network.Bluetooth.Tests bool isBluetoothGattClientSupported = false; BluetoothGattClient client = null; bool isConnected = false; + BluetoothLeDevice leDevice = null; [SetUp] public void Init() @@ -122,6 +123,12 @@ namespace Tizen.Network.Bluetooth.Tests Assert.IsInstanceOf(client, "[TestCase][ConnectAsync_RETURN_VALUE] Failed"); Assert.IsNotNull(client, "Precondition failed: client instance should not be null"); + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + } + await client.ConnectAsync(true); isConnected = true; } @@ -173,6 +180,12 @@ namespace Tizen.Network.Bluetooth.Tests client = BluetoothGattClient.CreateClient(PreconditionUtils.GetBleAddress()); Assert.IsInstanceOf(client, "[TestCase][ConnectAsync_RETURN_VALUE] Failed"); Assert.IsNotNull(client, "Precondition failed: client instance should not be null"); +/* + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + }*/ await client.ConnectAsync(false); isConnected = true; @@ -226,6 +239,12 @@ namespace Tizen.Network.Bluetooth.Tests Assert.IsInstanceOf(client, "[TestCase][DisconnectAsync_RETURN_VALUE] Failed"); Assert.IsNotNull(client, "Precondition failed: client instance should not be null"); + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + } + await client.ConnectAsync(true); isConnected = true; @@ -289,6 +308,12 @@ namespace Tizen.Network.Bluetooth.Tests }; client.ConnectionStateChanged += OnConnectionStateChanged; + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + } + await client.ConnectAsync(true); isConnected = true; await ManualTest.WaitForConfirm(); @@ -344,6 +369,12 @@ namespace Tizen.Network.Bluetooth.Tests Assert.IsInstanceOf(client, "[TestCase][RemoteAddress_PROPERTY_READ_ONLY] Failed"); Assert.IsNotNull(client, "Precondition failed: client instance should not be null"); + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + } + await client.ConnectAsync(true); isConnected = true; @@ -399,6 +430,12 @@ namespace Tizen.Network.Bluetooth.Tests Assert.IsInstanceOf(client, "[TestCase][GetService_RETURN_VALUE] Failed"); Assert.IsNotNull(client, "Precondition failed: client instance should not be null"); + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + } + await client.ConnectAsync(true); isConnected = true; @@ -455,6 +492,12 @@ namespace Tizen.Network.Bluetooth.Tests Assert.IsInstanceOf(client, "[TestCase][GetServices_RETURN_VALUE] Failed"); Assert.IsNotNull(client, "Precondition failed: client instance should not be null"); + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + } + await client.ConnectAsync(true); isConnected = true; @@ -512,6 +555,12 @@ namespace Tizen.Network.Bluetooth.Tests Assert.IsInstanceOf(client, "[TestCase][ReadValueAsync_Characteristic_RETURN_VALUE] Failed"); Assert.IsNotNull(client, "Precondition failed: client instance should not be null"); + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + } + await client.ConnectAsync(true); isConnected = true; @@ -571,6 +620,12 @@ namespace Tizen.Network.Bluetooth.Tests Assert.IsInstanceOf(client, "[TestCase][ReadValueAsync_Descriptor_RETURN_VALUE] Failed"); Assert.IsNotNull(client, "Precondition failed: client instance should not be null"); + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + } + await client.ConnectAsync(true); isConnected = true; @@ -632,6 +687,12 @@ namespace Tizen.Network.Bluetooth.Tests Assert.IsInstanceOf(client, "[TestCase][WriteValueAsync_Characteristic_RETURN_VALUE] Failed"); Assert.IsNotNull(client, "Precondition failed: client instance should not be null"); + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + } + await client.ConnectAsync(true); isConnected = true; @@ -696,6 +757,12 @@ namespace Tizen.Network.Bluetooth.Tests Assert.IsInstanceOf(client, "[TestCase][WriteValueAsync_Descriptor_RETURN_VALUE] Failed"); Assert.IsNotNull(client, "Precondition failed: client instance should not be null"); + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + } + await client.ConnectAsync(true); isConnected = true; @@ -761,6 +828,12 @@ namespace Tizen.Network.Bluetooth.Tests Assert.IsInstanceOf(client, "[TestCase][DestroyClient_RETURN_VALUE] Failed"); Assert.IsNotNull(client, "Precondition failed: client instance should not be null"); + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + } + await client.ConnectAsync(true); isConnected = true; diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothGattService.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothGattService.cs old mode 100755 new mode 100644 index 1711f374e..bca8a2205 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothGattService.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothGattService.cs @@ -26,6 +26,7 @@ namespace Tizen.Network.Bluetooth.Tests bool _isBluetoothGattClientSupported = false; BluetoothGattClient client = null; bool isConnected = false; + BluetoothLeDevice leDevice = null; [SetUp] public void Init() @@ -79,6 +80,12 @@ namespace Tizen.Network.Bluetooth.Tests Assert.IsInstanceOf(client, "[TestCase][GetGattClient_RETURN_VALUE] Failed"); Assert.IsNotNull(client, "Precondition failed: client instance should not be null"); + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + } + await client.ConnectAsync(true); isConnected = true; diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothLeDevice.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothLeDevice.cs index 3be19b440..65c41df7e 100644 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothLeDevice.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothLeDevice.cs @@ -42,7 +42,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public async Task AddressType_PROPERTY_READ_ONLY() @@ -79,7 +79,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("AddressType_PROPERTY_READ_ONLY"); await ManualTest.WaitForConfirm(); } @@ -98,7 +98,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public async Task AdvertsingDataInformation_PROPERTY_READ_ONLY() @@ -134,7 +134,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("AdvertsingDataInformation_PROPERTY_READ_ONLY"); await ManualTest.WaitForConfirm(); } @@ -153,7 +153,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public async Task Appearance_PROPERTY_READ_ONLY() @@ -202,7 +202,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("Appearance_PROPERTY_READ_ONLY"); await ManualTest.WaitForConfirm(); } @@ -221,7 +221,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public async Task DeviceName_PROPERTY_READ_ONLY() @@ -267,7 +267,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("DeviceName_PROPERTY_READ_ONLY"); await ManualTest.WaitForConfirm(); } @@ -286,7 +286,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public async Task ManufacturerData_PROPERTY_READ_ONLY() @@ -334,7 +334,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("ManufacturerData_PROPERTY_READ_ONLY"); await ManualTest.WaitForConfirm(); } @@ -353,7 +353,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public async Task RemoteAddress_PROPERTY_READ_ONLY() @@ -389,7 +389,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("RemoteAddress_PROPERTY_READ_ONLY"); await ManualTest.WaitForConfirm(); } @@ -408,7 +408,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public async Task Rssi_PROPERTY_READ_ONLY() @@ -444,7 +444,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("Rssi_PROPERTY_READ_ONLY"); await ManualTest.WaitForConfirm(); } @@ -463,7 +463,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public async Task ScanDataInformation_PROPERTY_READ_ONLY() @@ -505,7 +505,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("ScanDataInformation_PROPERTY_READ_ONLY"); await ManualTest.WaitForConfirm(); } @@ -524,7 +524,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public async Task ServiceSolictationUuid_PROPERTY_READ_ONLY() @@ -573,7 +573,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("ServiceSolictationUuid_PROPERTY_READ_ONLY"); await ManualTest.WaitForConfirm(); } @@ -592,7 +592,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public async Task ServiceUuid_PROPERTY_READ_ONLY() @@ -641,7 +641,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("ServiceUuid_PROPERTY_READ_ONLY"); await ManualTest.WaitForConfirm(); } @@ -660,7 +660,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "PRO")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public async Task TxPowerLevel_PROPERTY_READ_ONLY() @@ -708,7 +708,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("TxPowerLevel_PROPERTY_READ_ONLY"); await ManualTest.WaitForConfirm(); } @@ -727,7 +727,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "MR")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public async Task GetServiceDataList_RETURN_LIST() @@ -775,7 +775,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("GetServiceDataList_RETURN_LIST"); await ManualTest.WaitForConfirm(); } @@ -794,7 +794,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "PRW")] [Property("AUTHOR", "Gowtham Anandha Babu, gowtham.ab@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Postcondition(1, "NA")] public async Task PacketType_PROPERTY_READ_WRITE() @@ -824,7 +824,7 @@ namespace Tizen.Network.Bluetooth.Tests leDevice.PacketType = BluetoothLePacketType.BluetoothLeAdvertisingPacket; PacketType = leDevice.PacketType; Assert.AreEqual(BluetoothLePacketType.BluetoothLeAdvertisingPacket, PacketType); - } + } catch (NotSupportedException) { if (isBluetoothLeSupported == false) @@ -836,7 +836,7 @@ namespace Tizen.Network.Bluetooth.Tests catch (TypeInitializationException e) { if (isBluetoothLeSupported == false && e.InnerException.GetType() == typeof(NotSupportedException)) - { + { BluetoothHelper.DisplayLabel("PacketType_PROPERTY_READ_WRITE"); await ManualTest.WaitForConfirm(); } @@ -855,7 +855,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "MR")] [Property("AUTHOR", "Gowtham Anandha Babu, gowtham.ab@samsung.com")] [Precondition(1, "Bluetooth should be turned on.")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button.")] [Step(2, "TC should pass automatically.")] [Postcondition(1, "If TC fails, turn off and turn on Bluetooth. Try again.")] @@ -937,7 +937,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "MR")] [Property("AUTHOR", "Gowtham Anandha Babu, gowtham.ab@samsung.com")] [Precondition(1, "Bluetooth should be turned on.")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button.")] [Step(2, "TC should pass automatically.")] [Postcondition(1, "If TC fails, turn off and turn on Bluetooth. Try again.")] @@ -1024,7 +1024,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "EVL")] [Property("AUTHOR", "Gowtham Anandha Babu, gowtham.ab@samsung.com")] [Precondition(1, "Bluetooth should be turned on.")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button.")] [Step(2, "TC should pass automatically.")] [Postcondition(1, "If TC fails, turn off and turn on Bluetooth. Try again.")] @@ -1110,7 +1110,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "MR")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Step(2, "TC should pass automatically.")] [Postcondition(1, "NA")] @@ -1173,7 +1173,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "MR")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Step(2, "TC should pass automatically.")] [Postcondition(1, "NA")] @@ -1236,7 +1236,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "MR")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Step(2, "TC should pass automatically.")] [Postcondition(1, "NA")] @@ -1301,7 +1301,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "MR")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Step(2, "TC should pass automatically.")] [Postcondition(1, "NA")] @@ -1369,7 +1369,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "MR")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Step(2, "TC should pass automatically.")] [Postcondition(1, "NA")] @@ -1437,7 +1437,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("CRITERIA", "MR")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Step(2, "TC should pass automatically.")] [Postcondition(1, "NA")] @@ -1501,7 +1501,7 @@ namespace Tizen.Network.Bluetooth.Tests [Property("COVPARAM", "Tizen.Network.Bluetooth.BluetoothLePacketType")] [Property("AUTHOR", "Shikha, shikha.ta@samsung.com")] [Precondition(1, "Open Bluetooth in Settings on test device and turn on Bluetooth")] - [Precondition(2, "Run GATT Server test case on another device")] + [Precondition(2, "Run BluetoothGattServerTests.NotificationSent_CHECK_EVENT test case on server device.")] [Step(1, "Tap the Run button")] [Step(2, "TC should pass automatically.")] [Postcondition(1, "NA")] diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSValueChangedEventArgs.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSValueChangedEventArgs.cs index 119994d40..3f03ad8ee 100644 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSValueChangedEventArgs.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSValueChangedEventArgs.cs @@ -19,6 +19,7 @@ namespace Tizen.Network.Bluetooth.Tests string svcUuid = "181D"; string charUuid = "2A20"; bool isConnected = false; + BluetoothLeDevice leDevice = null; [SetUp] public void Init() @@ -70,6 +71,12 @@ namespace Tizen.Network.Bluetooth.Tests Assert.IsInstanceOf(client, "[TestCase][Value_READ_ONLY] Failed"); Assert.IsNotNull(client, "Precondition failed: client instance should not be null"); + if (leDevice == null) + { + leDevice = await BluetoothSetup.LeScanSetup(); + Assert.IsNotNull(leDevice, "Precondition failed: Le device instance should not be null"); + } + await client.ConnectAsync(true); isConnected = true;