From: hyunho Date: Wed, 11 Sep 2019 05:13:38 +0000 (+0900) Subject: [Tizen.Applications.ComponentBased.Default][TCSACR-265][Add TC for ComponentBased] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F58%2F213758%2F6;p=test%2Ftct%2Fcsharp%2Fapi.git [Tizen.Applications.ComponentBased.Default][TCSACR-265][Add TC for ComponentBased] Change-Id: If88303fa91efc52bb82f18d30bdb72347000ce9a Signed-off-by: hyunho --- diff --git a/tct-suite-vs/Resource/Tizen.ComponentBased.Default.Manual.Tests/EFLComponentBasedTest.tar b/tct-suite-vs/Resource/Tizen.ComponentBased.Default.Manual.Tests/EFLComponentBasedTest.tar new file mode 100644 index 000000000..3a426ef7f Binary files /dev/null and b/tct-suite-vs/Resource/Tizen.ComponentBased.Default.Manual.Tests/EFLComponentBasedTest.tar differ diff --git a/tct-suite-vs/Resource/Tizen.ComponentBased.Default.Manual.Tests/org.tizen.example.EFLComponentBasedTest-1.0.0.tpk b/tct-suite-vs/Resource/Tizen.ComponentBased.Default.Manual.Tests/org.tizen.example.EFLComponentBasedTest-1.0.0.tpk new file mode 100644 index 000000000..40ebb919a Binary files /dev/null and b/tct-suite-vs/Resource/Tizen.ComponentBased.Default.Manual.Tests/org.tizen.example.EFLComponentBasedTest-1.0.0.tpk differ diff --git a/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/Program.cs b/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/Program.cs new file mode 100755 index 000000000..722d7b8e9 --- /dev/null +++ b/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/Program.cs @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2019 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 NUnit.Framework; +using Xamarin.Forms; + +namespace XamarinApplication.Tizen +{ + class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication + { + private Application _app; + protected override void OnCreate() + { + Console.WriteLine("TCT : OnCreate()"); + base.OnCreate(); + if (ManualTest.IsWearable()) + { + _app = new WearableTemplate.MainPage(); + } + else + { + _app = new ManualTemplate.MainPage(); + } + LoadApplication(_app); + } + + static void Main(string[] args) + { + Console.WriteLine("TCT : Main()"); + var app = new Program(); + global::Xamarin.Forms.Platform.Tizen.Forms.Init(app); + app.Run(args); + } + } +} diff --git a/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/Tizen.ComponentBased.Default.Manual.Tests.csproj b/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/Tizen.ComponentBased.Default.Manual.Tests.csproj new file mode 100644 index 000000000..10ee11836 --- /dev/null +++ b/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/Tizen.ComponentBased.Default.Manual.Tests.csproj @@ -0,0 +1,39 @@ + + + + + Exe + tizen60 + + + + + true + + + + portable + + + None + + + + + + + + + + + Runtime + + + + + + + + + + diff --git a/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/Tizen.ComponentBased.Default.Manual.Tests.sln b/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/Tizen.ComponentBased.Default.Manual.Tests.sln new file mode 100644 index 000000000..d267cc05f --- /dev/null +++ b/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/Tizen.ComponentBased.Default.Manual.Tests.sln @@ -0,0 +1,92 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26730.15 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.ComponentBased.Default.Manual.Tests", "Tizen.ComponentBased.Default.Manual.Tests.csproj", "{D92BEEAC-3B2A-45F8-8C53-53B92550404A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit.framework", "..\nunit.framework\nunit.framework.csproj", "{B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunitlite", "..\nunitlite\nunitlite.csproj", "{FDB8025A-C029-461F-895E-287B4C65939B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManualTemplate", "..\Template\ManualTemplate\ManualTemplate.csproj", "{269F89A7-E648-4811-8421-844E00ACF5F0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManualTemplateForWearable", "..\Template\ManualTemplateForWearable\ManualTemplateForWearable.csproj", "{D36CED01-29BD-4EB3-8903-62E0BF2A822D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x64.ActiveCfg = Debug|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x64.Build.0 = Debug|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x86.ActiveCfg = Debug|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x86.Build.0 = Debug|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.Build.0 = Release|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x64.ActiveCfg = Release|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x64.Build.0 = Release|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x86.ActiveCfg = Release|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x86.Build.0 = Release|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x64.ActiveCfg = Debug|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x64.Build.0 = Debug|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x86.ActiveCfg = Debug|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x86.Build.0 = Debug|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.Build.0 = Release|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x64.ActiveCfg = Release|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x64.Build.0 = Release|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x86.ActiveCfg = Release|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x86.Build.0 = Release|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x64.ActiveCfg = Debug|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x64.Build.0 = Debug|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x86.ActiveCfg = Debug|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x86.Build.0 = Debug|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.Build.0 = Release|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x64.ActiveCfg = Release|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x64.Build.0 = Release|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x86.ActiveCfg = Release|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x86.Build.0 = Release|Any CPU + {269F89A7-E648-4811-8421-844E00ACF5F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {269F89A7-E648-4811-8421-844E00ACF5F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {269F89A7-E648-4811-8421-844E00ACF5F0}.Debug|x64.ActiveCfg = Debug|Any CPU + {269F89A7-E648-4811-8421-844E00ACF5F0}.Debug|x64.Build.0 = Debug|Any CPU + {269F89A7-E648-4811-8421-844E00ACF5F0}.Debug|x86.ActiveCfg = Debug|Any CPU + {269F89A7-E648-4811-8421-844E00ACF5F0}.Debug|x86.Build.0 = Debug|Any CPU + {269F89A7-E648-4811-8421-844E00ACF5F0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {269F89A7-E648-4811-8421-844E00ACF5F0}.Release|Any CPU.Build.0 = Release|Any CPU + {269F89A7-E648-4811-8421-844E00ACF5F0}.Release|x64.ActiveCfg = Release|Any CPU + {269F89A7-E648-4811-8421-844E00ACF5F0}.Release|x64.Build.0 = Release|Any CPU + {269F89A7-E648-4811-8421-844E00ACF5F0}.Release|x86.ActiveCfg = Release|Any CPU + {269F89A7-E648-4811-8421-844E00ACF5F0}.Release|x86.Build.0 = Release|Any CPU + {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Debug|x64.ActiveCfg = Debug|Any CPU + {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Debug|x64.Build.0 = Debug|Any CPU + {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Debug|x86.ActiveCfg = Debug|Any CPU + {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Debug|x86.Build.0 = Debug|Any CPU + {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Release|Any CPU.Build.0 = Release|Any CPU + {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Release|x64.ActiveCfg = Release|Any CPU + {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Release|x64.Build.0 = Release|Any CPU + {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Release|x86.ActiveCfg = Release|Any CPU + {D36CED01-29BD-4EB3-8903-62E0BF2A822D}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {ED382B91-9930-40B6-B3D7-362304C78680} + EndGlobalSection +EndGlobal diff --git a/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/shared/res/Tizen.ComponentBased.Default.Manual.Tests.png b/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/shared/res/Tizen.ComponentBased.Default.Manual.Tests.png new file mode 100755 index 000000000..9765b1bda Binary files /dev/null and b/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/shared/res/Tizen.ComponentBased.Default.Manual.Tests.png differ diff --git a/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/testcase/TSEFLComponentBasedApplication.cs b/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/testcase/TSEFLComponentBasedApplication.cs new file mode 100644 index 000000000..5803dc7eb --- /dev/null +++ b/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/testcase/TSEFLComponentBasedApplication.cs @@ -0,0 +1,168 @@ +/* + * Copyright (c) 2019 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 Tizen.Applications; +using Xamarin.Forms; + +namespace Tizen.EFLComponentBasedApplication.Tests +{ + [TestFixture] + [Description("Tizen.Applications.EFLComponentBasedApplication test")] + public class EFLComponentBasedApplicationTests + { + private TestPage _testPage = TestPage.GetInstance(); + private Button _comp_button; + private string _testAppId = "org.tizen.example.EFLComponentBasedTest"; + + [SetUp] + public void Init() + { + LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Preconditions for each TEST"); + _comp_button = new Button(); + } + + [TearDown] + public void Destroy() + { + LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Postconditions for each TEST"); + _comp_button.Clicked -= OnClick; + _comp_button = null; + } + + private void CreateCompButton(string btnText) + { + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "CreateButton"); + var layout = new StackLayout() + { + IsVisible = true, + HorizontalOptions = LayoutOptions.FillAndExpand, + VerticalOptions = LayoutOptions.FillAndExpand, + }; + + _comp_button = new Button() + { + Text = btnText, + FontSize = 20, + VerticalOptions = LayoutOptions.Center, + HorizontalOptions = LayoutOptions.FillAndExpand, + }; + + layout.Children.Add(_comp_button); + _testPage.ExecuteTC(layout); + } + + private void OnClick(object sender, EventArgs e) + { + AppControl control = new AppControl(); + control.ApplicationId = _testAppId; + control.Operation = AppControlOperations.Default; + AppControl.SendLaunchRequest(control); + } + + [Test] + [Category("P1")] + [Description("MANUAL TEST : OnInit() should be called after launch component-based application")] + [Property("SPEC", "Tizen.Applications.ComponentBased.Default.EFLComponentBasedApplication.OnInit M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")] + [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")] + [Precondition(2, "Enter command \"sdb dlog EFLComponentBasedTest\" to terminal")] + [Step(1, "Click run TC")] + [Step(2, "Press 'Click me' button")] + [Step(3, "Check if log show \"EFLComponentBasedTest: OnInit\".")] + [Postcondition(1, "Close the terminal")] + public async Task OnInit_MANUAL_TEST() + { + CreateCompButton("Click me!! Test: Launch ComponentBased Application"); + _comp_button.Clicked += OnClick; + + /* TEST CODE */ + await ManualTest.WaitForConfirm(); + } + + [Test] + [Category("P1")] + [Description("MANUAL TEST : OnRun() should be called after OnInit() function is called")] + [Property("SPEC", "Tizen.Applications.ComponentBased.Default.EFLComponentBasedApplication.OnRun M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")] + [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")] + [Precondition(2, "Enter command \"sdb dlog ComponentBasedTest\" to terminal")] + [Step(1, "Click run TC")] + [Step(2, "Press 'Click me' button")] + [Step(3, "Check if log show \"EFLComponentBasedTest: OnRun\".")] + [Postcondition(1, "Close the terminal")] + public async Task OnRun_MANUAL_TEST() + { + CreateCompButton("Click me!! Test: Launch ComponentBased Application"); + _comp_button.Clicked += OnClick; + + /* TEST CODE */ + await ManualTest.WaitForConfirm(); + } + + [Test] + [Category("P1")] + [Description("MANUAL TEST : OnExit() should be called before OnFinished() function is called")] + [Property("SPEC", "Tizen.Applications.ComponentBased.Default.EFLComponentBasedApplication.OnExit M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")] + [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")] + [Precondition(2, "Enter command \"sdb dlog EFLComponentBasedTest\" to terminal")] + [Step(1, "Click run TC")] + [Step(2, "Press 'Click me' button")] + [Step(3, "Check if log show \"EFLComponentBasedTest: OnExit\".")] + [Postcondition(1, "Close the terminal")] + public async Task OnExit_MANUAL_TEST() + { + CreateCompButton("Click me!! Test: Launch ComponentBased Application"); + _comp_button.Clicked += OnClick; + + /* TEST CODE */ + await ManualTest.WaitForConfirm(); + } + + [Test] + [Category("P1")] + [Description("MANUAL TEST : OnFinished() should be called after OnExit() function is called")] + [Property("SPEC", "Tizen.Applications.ComponentBased.Default.EFLComponentBasedApplication.OnFinished M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")] + [Precondition(1, "Enter command \"sdb dlog -c\" to clear log")] + [Precondition(2, "Enter command \"sdb dlog EFLComponentBasedTest\" to terminal")] + [Step(1, "Click run TC")] + [Step(2, "Press 'Click me' button")] + [Step(3, "Press launched application's 'Exit' button")] + [Step(4, "Check if log show \"EFLComponentBasedTest: OnFinished\".")] + [Postcondition(1, "Close the terminal")] + public async Task OnFinished_MANUAL_TEST() + { + CreateCompButton("Click me!! Test: Launch ComponentBased Application"); + _comp_button.Clicked += OnClick; + + /* TEST CODE */ + await ManualTest.WaitForConfirm(); + } + } +} diff --git a/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/tizen-manifest.xml b/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/tizen-manifest.xml new file mode 100755 index 000000000..b5d90cac3 --- /dev/null +++ b/tct-suite-vs/Tizen.ComponentBased.Default.Manual.Tests/tizen-manifest.xml @@ -0,0 +1,16 @@ + + + + + Tizen.ComponentBased.Default.Manual.Tests.png + + + + http://tizen.org/privilege/appmanager.launch + + diff --git a/tct-suite-vs/Tizen.ComponentBased.Default.Tests/Program.cs b/tct-suite-vs/Tizen.ComponentBased.Default.Tests/Program.cs new file mode 100644 index 000000000..e0f15ebe5 --- /dev/null +++ b/tct-suite-vs/Tizen.ComponentBased.Default.Tests/Program.cs @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2019 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 NUnitLite.TUnit; +using AutoTemplate; + +namespace XamarinForTizen.Tizen +{ + + class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication + { + private static App _app; + protected override void OnCreate() + { + base.OnCreate(); + + Console.WriteLine("TCT : OnCreate()"); + _app = new App(); + LoadApplication(_app); + + TRunner t = new TRunner(); + t.LoadTestsuite(); + t.Execute(); + } + + public static App getApp() + { + return _app; + } + static void Main(string[] args) + { + Console.WriteLine("TCT : Main()"); + var app = new Program(); + global::Xamarin.Forms.Platform.Tizen.Forms.Init(app); + app.Run(args); + } + } +} diff --git a/tct-suite-vs/Tizen.ComponentBased.Default.Tests/Tizen.ComponentBased.Default.Tests.csproj b/tct-suite-vs/Tizen.ComponentBased.Default.Tests/Tizen.ComponentBased.Default.Tests.csproj new file mode 100644 index 000000000..00a11c98f --- /dev/null +++ b/tct-suite-vs/Tizen.ComponentBased.Default.Tests/Tizen.ComponentBased.Default.Tests.csproj @@ -0,0 +1,44 @@ + + + + + Exe + tizen60 + + + + + true + + + + portable + + + None + + + + + + + + + + + Runtime + + + + + + + + + + + ..\..\..\..\source\TizenFX\src\Tizen.Applications.ComponentBased.Default\bin\Debug\netstandard2.0\Tizen.Applications.ComponentBased.Default.dll + + + + diff --git a/tct-suite-vs/Tizen.ComponentBased.Default.Tests/Tizen.ComponentBased.Default.Tests.sln b/tct-suite-vs/Tizen.ComponentBased.Default.Tests/Tizen.ComponentBased.Default.Tests.sln new file mode 100644 index 000000000..6c4d66583 --- /dev/null +++ b/tct-suite-vs/Tizen.ComponentBased.Default.Tests/Tizen.ComponentBased.Default.Tests.sln @@ -0,0 +1,78 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26730.15 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.ComponentBased.Default.Tests", "Tizen.ComponentBased.Default.Tests.csproj", "{D92BEEAC-3B2A-45F8-8C53-53B92550404A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit.framework", "..\nunit.framework\nunit.framework.csproj", "{B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunitlite", "..\nunitlite\nunitlite.csproj", "{FDB8025A-C029-461F-895E-287B4C65939B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoTemplate", "..\Template\AutoTemplate\AutoTemplate.csproj", "{B11ABB0C-C3C1-4B5C-8251-A15628A775F3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x64.ActiveCfg = Debug|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x64.Build.0 = Debug|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x86.ActiveCfg = Debug|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x86.Build.0 = Debug|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.Build.0 = Release|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x64.ActiveCfg = Release|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x64.Build.0 = Release|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x86.ActiveCfg = Release|Any CPU + {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x86.Build.0 = Release|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x64.ActiveCfg = Debug|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x64.Build.0 = Debug|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x86.ActiveCfg = Debug|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x86.Build.0 = Debug|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.Build.0 = Release|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x64.ActiveCfg = Release|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x64.Build.0 = Release|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x86.ActiveCfg = Release|Any CPU + {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x86.Build.0 = Release|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x64.ActiveCfg = Debug|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x64.Build.0 = Debug|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x86.ActiveCfg = Debug|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x86.Build.0 = Debug|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.Build.0 = Release|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x64.ActiveCfg = Release|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x64.Build.0 = Release|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x86.ActiveCfg = Release|Any CPU + {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x86.Build.0 = Release|Any CPU + {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x64.ActiveCfg = Debug|Any CPU + {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x64.Build.0 = Debug|Any CPU + {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x86.ActiveCfg = Debug|Any CPU + {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x86.Build.0 = Debug|Any CPU + {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|Any CPU.Build.0 = Release|Any CPU + {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x64.ActiveCfg = Release|Any CPU + {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x64.Build.0 = Release|Any CPU + {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x86.ActiveCfg = Release|Any CPU + {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {ED382B91-9930-40B6-B3D7-362304C78680} + EndGlobalSection +EndGlobal diff --git a/tct-suite-vs/Tizen.ComponentBased.Default.Tests/shared/res/Tizen.ComponentBased.Default.Tests.png b/tct-suite-vs/Tizen.ComponentBased.Default.Tests/shared/res/Tizen.ComponentBased.Default.Tests.png new file mode 100755 index 000000000..9765b1bda Binary files /dev/null and b/tct-suite-vs/Tizen.ComponentBased.Default.Tests/shared/res/Tizen.ComponentBased.Default.Tests.png differ diff --git a/tct-suite-vs/Tizen.ComponentBased.Default.Tests/testcase/TSEFLComponentBasedApplication.cs b/tct-suite-vs/Tizen.ComponentBased.Default.Tests/testcase/TSEFLComponentBasedApplication.cs new file mode 100644 index 000000000..c0a4a786c --- /dev/null +++ b/tct-suite-vs/Tizen.ComponentBased.Default.Tests/testcase/TSEFLComponentBasedApplication.cs @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2019 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 NUnit.Framework; +using NUnit.Framework.TUnit; +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Tizen; +using Tizen.Applications; +using Tizen.Applications.ComponentBased.Common; +using Tizen.Applications.ComponentBased.Default; + +namespace Tizen.ComponentBased.Tests +{ + + public class FrameComp : FrameComponent + { + class TWindowInfo : IWindowInfo + { + public int ResourceId + { + get + { + return 1; + } + } + } + + public override IWindowInfo CreateWindowInfo() + { + return new TWindowInfo(); + } + + public override bool OnCreate() + { + return true; + } + } + + public class TestApp : EFLComponentBasedApplication + { + public TestApp(IDictionary typeInfo) : base(typeInfo) + { + } + protected override void OnRun() + { + + } + } + + [TestFixture] + [Description("ComponentBasedApplication Class Tests")] + public class ComponentBasedTests + { + [SetUp] + public void Init() + { + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST"); + } + + [TearDown] + public void Destroy() + { + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Postconditions for each TEST"); + } + + [Test] + [Category("P1")] + [Description("Create an efl-component-based application")] + [Property("SPEC", "Tizen.Applications.ComponentBased.Default.EFLComponentBasedApplication.EFLComponentBasedApplication C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")] + [Property("COVPARAM", "Dictionary")] + public void EFLComponentBasedApplication_INIT() + { + var typeInfo = new Dictionary(); + Assert.NotNull(typeInfo, "Should not return NULL"); + Assert.IsInstanceOf>(typeInfo, "Should return Dictionary."); + + typeInfo.Add(typeof(FrameComp), "csharp_frame"); + var app = new TestApp(typeInfo); + Assert.NotNull(app, "Should not return NULL"); + Assert.IsInstanceOf(app, "Should return EFLComponentBasedApplication."); + } + } +} diff --git a/tct-suite-vs/Tizen.ComponentBased.Default.Tests/testcase/TSEFLWindowInfo.cs b/tct-suite-vs/Tizen.ComponentBased.Default.Tests/testcase/TSEFLWindowInfo.cs new file mode 100644 index 000000000..1e8f4e6c4 --- /dev/null +++ b/tct-suite-vs/Tizen.ComponentBased.Default.Tests/testcase/TSEFLWindowInfo.cs @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2019 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 ElmSharp; +using NUnit.Framework; +using NUnit.Framework.TUnit; +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Tizen; +using Tizen.Applications; +using Tizen.Applications.ComponentBased.Common; +using Tizen.Applications.ComponentBased.Default; + +namespace Tizen.ComponentBased.Tests +{ + + [TestFixture] + [Description("EFLWindowInfo Class Tests")] + public class EFLWindowInfoTests + { + [SetUp] + public void Init() + { + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Preconditions for each TEST"); + } + + [TearDown] + public void Destroy() + { + LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Postconditions for each TEST"); + } + + [Test] + [Category("P1")] + [Description("Create an efl-window object")] + [Property("SPEC", "Tizen.Applications.ComponentBased.Default.EFLWindowInfo.EFLWindowInfo C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")] + [Property("COVPARAM", "ElmSharp.Window")] + public void EFLWindowInfo_INIT() + { + var window = new Window("test"); + Assert.NotNull(window, "Should not return NULL"); + Assert.IsInstanceOf(window, "Should return Window."); + + var info = new EFLWindowInfo(window); + Assert.NotNull(info, "Should not return NULL"); + Assert.IsInstanceOf(info, "Should return EFLWindowInfo."); + } + + [Test] + [Category("P1")] + [Description("Test : Gets ResourceId of the EFLWindowInfo.")] + [Property("SPEC", "Tizen.Applications.ComponentBased.Default.EFLWindowInfo.ResourceId A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Hyunho Kang, hhstark.kang@samsung.com")] + public void ResourceId_Return_Value() + { + var window = new Window("test"); + Assert.NotNull(window, "Should not return NULL"); + Assert.IsInstanceOf(window, "Should return Window."); + + var info = new EFLWindowInfo(window); + Assert.NotNull(info, "Should not return NULL"); + Assert.IsInstanceOf(info, "Should return EFLWindowInfo."); + Assert.GreaterOrEqual(info.ResourceId, 0); + } + } +} diff --git a/tct-suite-vs/Tizen.ComponentBased.Default.Tests/tizen-manifest.xml b/tct-suite-vs/Tizen.ComponentBased.Default.Tests/tizen-manifest.xml new file mode 100755 index 000000000..84c54bb28 --- /dev/null +++ b/tct-suite-vs/Tizen.ComponentBased.Default.Tests/tizen-manifest.xml @@ -0,0 +1,16 @@ + + + + + Tizen.ComponentBased.Default.Tests.png + + + + http://tizen.org/privilege/appmanager.launch + +