From: Sanghoon Lee Date: Fri, 23 Mar 2018 04:51:32 +0000 (+0900) Subject: [USB][Non-ACR][Removed test tcs in manual suite] X-Git-Tag: public_m1_final~101 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d201e7bafab5d8c13c89544c28111896e787fe4;p=test%2Ftct%2Fcsharp%2Fapi.git [USB][Non-ACR][Removed test tcs in manual suite] Change-Id: Idb7f43b5a305fc727272807035b9ce36e1b65334 --- diff --git a/tct-suite-vs/Tizen.Usb.Manual.Tests/testcase/TSButton.cs b/tct-suite-vs/Tizen.Usb.Manual.Tests/testcase/TSButton.cs deleted file mode 100755 index eb6263d..0000000 --- a/tct-suite-vs/Tizen.Usb.Manual.Tests/testcase/TSButton.cs +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License - */ - -using System; -using System.Threading.Tasks; -using NUnit.Framework; -using NUnit.Framework.TUnit; -using Xamarin.Forms; - -namespace Tizen.Sample.Tests -{ - [TestFixture] - [Description("Tizen.Sample.Button test")] - public class ButtonTests - { - private static TestPage _testPage = TestPage.GetInstance(); - private static Button _button; - - [SetUp] - public static void Init() - { - LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Preconditions for each TEST"); - _button = new Button(); - } - - [TearDown] - public static void Destroy() - { - LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Postconditions for each TEST"); - _button = null; - } - - private static void CreateButton(string buttonText) - { - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "CreateButton"); - - var layout = new StackLayout() - { - IsVisible = true, - HorizontalOptions = LayoutOptions.FillAndExpand, - VerticalOptions = LayoutOptions.FillAndExpand, - }; - - _button = new Button() - { - Text = buttonText, - FontSize = 20, - VerticalOptions = LayoutOptions.Center, - HorizontalOptions = LayoutOptions.FillAndExpand, - }; - - layout.Children.Add(_button); - _testPage.ExecuteTC(layout); - } - - private static void OnClick(object sender, EventArgs e) - { - // If your test is fail, you should set Assert.True(false , "msg"); - Assert.True(true); - // ManualTest.Confirm() API will terminate WaitForConfirm() method, and will execute rest of the code. - ManualTest.Confirm(); - } - - [Test] - [Category("P1")] - [Description("Test: Handle event click button.")] - [Property("SPEC", "Tizen.UI.Button.Clicked E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Pham Phuong Dong, dong.phuong@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click button")] - [Postcondition(1, "NA")] - public static async Task Clicked_CB() - { - CreateButton("Click me!! Test: Handle event click button"); - _button.Clicked += OnClick; - // Waits for user confirmation. - await ManualTest.WaitForConfirm(); - } - - private static void CreateButtonPage(string buttonText) - { - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Init"); - - var layout = new StackLayout() - { - IsVisible = true, - HorizontalOptions = LayoutOptions.FillAndExpand, - VerticalOptions = LayoutOptions.FillAndExpand, - }; - - _button = new Button() - { - Text = buttonText, - FontSize = 20, - VerticalOptions = LayoutOptions.Center, - HorizontalOptions = LayoutOptions.FillAndExpand, - }; - - layout.Children.Add(_button); - // Invoke ExecuteTC() method to add UI to test page. - _testPage.ExecuteTC(new ContentPage() - { - Content = layout, - }); - } - - public static void OnPressed(object sender, EventArgs e) - { - // pop layout - _testPage.getNavigationPage().PopAsync(); - // or Assert.True(false); - Assert.True(true); - // ManualTest.Confirm() API will terminate WaitForConfirm() method, and will execute rest of the code. - ManualTest.Confirm(); - } - - [Test] - [Category("P1")] - [Description("Test: Handle event click button.")] - [Property("SPEC", "Tizen.UI.Button.Clicked E")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "EVL")] - [Property("AUTHOR", "Pham Phuong Dong, dong.phuong@samsung.com")] - [Precondition(1, "NA")] - [Step(1, "Click run TC")] - [Step(2, "Click button after new page shown")] - [Postcondition(1, "NA")] - public static async Task Pressed_CB() - { - CreateButtonPage("Click me!! Test: Handle event press button"); - _button.Clicked += OnPressed; - // Waits for user confirmation. - await ManualTest.WaitForConfirm(); - } - } -} - - - diff --git a/tct-suite-vs/Tizen.Usb.Manual.Tests/testcase/TSLog.cs b/tct-suite-vs/Tizen.Usb.Manual.Tests/testcase/TSLog.cs deleted file mode 100755 index 5e359aa..0000000 --- a/tct-suite-vs/Tizen.Usb.Manual.Tests/testcase/TSLog.cs +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License - */ - -using System.Threading.Tasks; -using NUnit.Framework; - -namespace Tizen.Sample.Tests -{ - - [TestFixture] - [Description("Tizen::Log Tests")] - public class LogTests { - - private static string TAG = "TCT"; - private static string _message; - - [SetUp] - public static void Init() - { - } - - [TearDown] - public static void Destroy() - { - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Send debug log to dlog.")] - [Property("SPEC", " Tizen.Log.Debug M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Nguyen Duc Han, duchan.ng@samsung.com")] - [Precondition(1, "Open terminal to view logs.")] - [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")] - [Precondition(3, "Enter command \"sdb dlog TCT\" to terminal")] - [Step(1, "Click run TC")] - [Step(2, "check if log show \"Debug log message\" with Tag \"TCT\" and type log \"D\".")] - [Postcondition(1, "Close the terminal")] - public static async Task Debug_PRINT_TO_DLOG() { - /* - * TEST CODE - MANUAL TEST - * use command: "sdb dlog | grep TCT" to see log. - */ - _message = "Debug log message"; - Log.Debug(TAG, _message); - - /* - * RESULT : PASS - * log show "Debug log message" with Tag "TCT" and type log "D" - */ - // Waits for user confirmation. - await ManualTest.WaitForConfirm(); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Send error log to dlog.")] - [Property("SPEC", " Tizen.Log.Error M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Nguyen Duc Han, duchan.ng@samsung.com")] - [Precondition(1, "Open terminal to view logs.")] - [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")] - [Precondition(3, "Enter command \"sdb dlog TCT\" to terminal")] - [Step(1, "Click run TC")] - [Step(2, "Check if log show \"Error log message\" with Tag \"TCT\" and type log \"E\".")] - [Postcondition(1, "Close the terminal")] - public static async Task Error_PRINT_TO_DLOG() { - /* - * TEST CODE - MANUAL TEST - * use command: "sdb dlog | grep TCT" to see log. - */ - _message = "Error log message"; - Log.Error(TAG, _message); - - /* - * RESULT : PASS - * log show "Error log message" with Tag "TCT" and type log "E" - */ - // Waits for user confirmation. - await ManualTest.WaitForConfirm(); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Send fatal log to dlog.")] - [Property("SPEC", " Tizen.Log.Fatal M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Nguyen Duc Han, duchan.ng@samsung.com")] - [Precondition(1, "Open terminal to view logs.")] - [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")] - [Precondition(3, "Enter command \"sdb dlog TCT\" to terminal")] - [Step(1, "Click run TC")] - [Step(2, "Check if log show \"Fatal log message\" with Tag \"TCT\" and type log \"F\".")] - [Postcondition(1, "Close the terminal")] - public static async Task Fatal_PRINT_TO_DLOG() { - /* - * TEST CODE - MANUAL TEST - * use command: "sdb dlog | grep TCT" to see log. - */ - _message = "Fatal log message"; - Log.Fatal(TAG, _message); - - /* - * RESULT : PASS - * log show "Fatal log message" with Tag "TCT" and type log "F" - */ - // Waits for user confirmation. - await ManualTest.WaitForConfirm(); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Send info log to dlog.")] - [Property("SPEC", " Tizen.Log.Info M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Nguyen Duc Han, duchan.ng@samsung.com")] - [Precondition(1, "Open terminal to view logs.")] - [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")] - [Precondition(3, "Enter command \"sdb dlog TCT\" to terminal")] - [Step(1, "Click run TC")] - [Step(2, "Check if log show \"Info log message\" with Tag \"TCT\" and type log \"I\".")] - [Postcondition(1, "Close the terminal")] - public static async Task Info_PRINT_TO_DLOG() { - /* - * TEST CODE - MANUAL TEST - * use command: "sdb dlog | grep TCT" to see log. - */ - _message = "Info log message"; - Log.Info(TAG, _message); - - /* - * RESULT : PASS - * log show "Info log message" with Tag "TCT" and type log "I" - */ - // Waits for user confirmation. - await ManualTest.WaitForConfirm(); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Send Verbose log to dlog.")] - [Property("SPEC", " Tizen.Log.Verbose M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Nguyen Duc Han, duchan.ng@samsung.com")] - [Precondition(1, "Open terminal to view logs.")] - [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")] - [Precondition(3, "Enter command \"sdb dlog TCT\" to terminal")] - [Step(1, "Click run TC")] - [Step(2, "Check if log show \"Verbose log message\" with Tag \"TCT\" and type log \"V\".")] - [Postcondition(1, "Close the terminal")] - public static async Task Verbose_PRINT_TO_DLOG() { - /* - * TEST CODE - MANUAL TEST - * use command: "sdb dlog TCT" to see log. - */ - _message = "Verbose log message"; - Log.Verbose(TAG, _message); - - /* - * RESULT : PASS - * log not show "Verbose log message" - */ - // Waits for user confirmation. - await ManualTest.WaitForConfirm(); - } - - [Test] - [Category("P1")] - [Description("MANUAL TEST : Send warn log to dlog.")] - [Property("SPEC", " Tizen.Log.Warn M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Nguyen Duc Han, duchan.ng@samsung.com")] - [Precondition(1, "Open terminal to view logs.")] - [Precondition(2, "Enter command \"sdb dlog -c\" to clear log")] - [Precondition(3, "Enter command \"sdb dlog TCT\" to terminal")] - [Step(1, "Click run TC")] - [Step(2, "Check if log show \"Warn log message\" with Tag \"TCT\" and type log \"W\".")] - [Postcondition(1, "Close the terminal")] - public static async Task Warn_PRINT_TO_DLOG() { - /* - * TEST CODE - MANUAL TEST - * use command: "sdb dlog | grep TCT" to see log. - */ - _message = "Warn log message"; - Log.Warn(TAG, _message); - - /* - * RESULT : PASS - * log show "Warn log message" with Tag "TCT" and type log "W" - */ - // Waits for user confirmation. - await ManualTest.WaitForConfirm(); - } - } -} -