From: DoHyun Pyun Date: Mon, 7 Oct 2019 23:56:17 +0000 (+0900) Subject: [Bluetooth][Non-ACR] Add pre-condition logic in socket TCs X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F84%2F215384%2F1;p=test%2Ftct%2Fcsharp%2Fapi.git [Bluetooth][Non-ACR] Add pre-condition logic in socket TCs This patchset resolves TFDF-5922 issue on the emulator image Change-Id: I39ccfbd849dd5b5e78650702b9570f30c70ef159 --- diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSIBluetoothClientSocket.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSIBluetoothClientSocket.cs index cbcbc9a9c..33c0ef904 100755 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSIBluetoothClientSocket.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSIBluetoothClientSocket.cs @@ -44,6 +44,14 @@ namespace Tizen.Network.Bluetooth.Tests public async Task Connect_SOCKET_CONNECTION_TEST() { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("Connect_SOCKET_CONNECTION_TEST"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { @@ -104,6 +112,14 @@ namespace Tizen.Network.Bluetooth.Tests public async Task Disconnect_SOCKET_DISCONNECTION_TEST() { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("Disconnect_SOCKET_DISCONNECTION_TEST"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSIBluetoothServerSocket.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSIBluetoothServerSocket.cs index 4843edcde..a52a38bb2 100755 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSIBluetoothServerSocket.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSIBluetoothServerSocket.cs @@ -46,6 +46,14 @@ namespace Tizen.Network.Bluetooth.Tests { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("ConnectionStateChanged_EVENT"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { @@ -104,6 +112,14 @@ namespace Tizen.Network.Bluetooth.Tests { int writtenLength; + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("SendData_SEND_DATA_TEST_SERVER"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateServerSocketUtil(); await BluetoothSetup.AcceptSocketUtil(); await Task.Delay(2000); @@ -156,6 +172,14 @@ namespace Tizen.Network.Bluetooth.Tests { int writtenLength; + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("SendData_SEND_DATA_TEST_CLIENT"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { @@ -214,6 +238,14 @@ namespace Tizen.Network.Bluetooth.Tests { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("DataReceived_SERVER_EVENT"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateServerSocketUtil(); await BluetoothSetup.AcceptSocketUtil(); BluetoothSetup.Socket.DataReceived += (sender, args) => @@ -272,6 +304,14 @@ namespace Tizen.Network.Bluetooth.Tests { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("DataReceived_CLIENT_EVENT"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketConnection.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketConnection.cs index 5f81d7f17..1a507c58a 100644 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketConnection.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketConnection.cs @@ -45,6 +45,14 @@ namespace Tizen.Network.Bluetooth.Tests { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("SocketFd_READ_ONLY"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { @@ -106,6 +114,14 @@ namespace Tizen.Network.Bluetooth.Tests { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("Address_READ_ONLY"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { @@ -168,6 +184,14 @@ namespace Tizen.Network.Bluetooth.Tests { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("ServiceUuid_READ_ONLY"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { @@ -230,6 +254,14 @@ namespace Tizen.Network.Bluetooth.Tests { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("Client_READ_ONLY"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketConnectionStateChangedEventArgs.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketConnectionStateChangedEventArgs.cs index 2b5f4dcae..3acd30c6a 100755 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketConnectionStateChangedEventArgs.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketConnectionStateChangedEventArgs.cs @@ -45,6 +45,14 @@ namespace Tizen.Network.Bluetooth.Tests { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("Connection_READ_ONLY"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { @@ -100,6 +108,14 @@ namespace Tizen.Network.Bluetooth.Tests { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("Result_READ_ONLY"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { @@ -154,6 +170,14 @@ namespace Tizen.Network.Bluetooth.Tests { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("State_READ_ONLY"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketData.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketData.cs index 63dd8c187..1aa4a0064 100755 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketData.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketData.cs @@ -69,6 +69,14 @@ namespace Tizen.Network.Bluetooth.Tests { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("SocketFd_READ_ONLY"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { @@ -129,6 +137,14 @@ namespace Tizen.Network.Bluetooth.Tests { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("DataSize_READ_ONLY"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { @@ -188,6 +204,14 @@ namespace Tizen.Network.Bluetooth.Tests { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("Data_READ_ONLY"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) { diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketDataReceivedEventArgs.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketDataReceivedEventArgs.cs index 278a95252..68de9878c 100755 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketDataReceivedEventArgs.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSSocketDataReceivedEventArgs.cs @@ -68,6 +68,14 @@ namespace Tizen.Network.Bluetooth.Tests { try { + /* We can't occupy the precondition, if BT feature is not supported in Manual TC */ + if (_isBluetoothSupported == false) + { + BluetoothHelper.DisplayLabel("Data_READ_ONLY_CLIENT"); + await ManualTest.WaitForConfirm(); + return; + } + BluetoothSetup.CreateClientSocketUtil(); if (BluetoothSetup.Client == null) {