From: raycad Date: Wed, 6 Mar 2019 10:17:20 +0000 (+0700) Subject: [Non-ACR][Framework][Fix only load not pass testcases for ElmSharp, ElmSharpWearable... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4796df8c71e6e25408bf725d2a7bd8fd2425e48f;p=test%2Ftct%2Fcsharp%2Fapi.git [Non-ACR][Framework][Fix only load not pass testcases for ElmSharp, ElmSharpWearable, NUI] Change-Id: I8dcabe1b34cc1df90a2740d2d7f908a2c84db57b --- diff --git a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/MainPage.cs b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/MainPage.cs index c7d641e78..a6eee0759 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/MainPage.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/MainPage.cs @@ -67,20 +67,23 @@ namespace NUnit.Framework private GenList _listView; private GenItemClass _resultClass; private Box _mainLayout; + private List _listNotPass; public DefaultMainPage() { _mainWindow = MainWindow.GetInstance(); _tunitrunner = new TRunner(); _tunitrunner.LoadTestsuite(); + _listNotPass = new List(); _tcIDList = new List(); _listItem = new List(); + _listNotPass = TSettings.GetInstance().GetNotPassListManual(); int count = 0; - foreach (KeyValuePair pair in _tunitrunner.GetTestList()) + foreach (var tc in _listNotPass) { - _listItem.Add(new ItemData { No = count, TCName = pair.Key, Result = StrResult.NOTRUN }); - _tcIDList.Add(pair.Key); count++; + _listItem.Add(new ItemData { No = count, TCName = tc, Result = StrResult.NOTRUN }); + _tcIDList.Add(tc); } ResultNumber.Total = ResultNumber.NotRun = _tcIDList.Count; @@ -152,7 +155,7 @@ namespace NUnit.Framework if (_listItem.Count > 0) { RunType.Value = RunType.AUTO; - _testPage.Show(_navigationPage, 0); + _testPage.Show(_navigationPage, 1); } }; diff --git a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/TestPage.cs b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/TestPage.cs index 261bb5ab6..4227c93b3 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/TestPage.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/TestPage.cs @@ -23,6 +23,7 @@ using System.Reflection; using ElmSharpApplication.Tizen; using ElmSharp; using ElmSharp.Tests; +using Tizen.Applications; namespace NUnit.Framework { @@ -112,6 +113,7 @@ namespace NUnit.Framework private TRunner _tunitRunner; private TSettings _tsettings; private NavigationButton _pressButton = NavigationButton.NA; + private ToastMessage _toastMessage; private const string STEP_ATTRIBUTE_NAME = "NUnit.Framework.StepAttribute"; private const string PRECONDITION_ATTRIBUTE_NAME = "NUnit.Framework.PreconditionAttribute"; @@ -129,6 +131,7 @@ namespace NUnit.Framework public override void Initialize(TRunner tunitRunner, List testcaseIDList, List listItem, List resultListItems, GenItemClass resultClass) { + _toastMessage = new ToastMessage(); RunType.Value = RunType.MANUAL; _tunitRunner = tunitRunner; _tunitRunner.SingleTestDone += OnSingleTestDone; @@ -445,8 +448,8 @@ namespace NUnit.Framework public override void Show(Naviframe navigationPage, int testcaseIndex) { _navigationPage = navigationPage; - _tcIndex = testcaseIndex; - _descriptionTitle.Text = "DESCRIPTION : #" + _tcIndex; + _tcIndex = testcaseIndex - 1; + _descriptionTitle.Text = "DESCRIPTION : #" + testcaseIndex; _tcResultText.Text = _listItem[_tcIndex].Result; SetColor(_tcResultText.Text); UpdateDescriptions(); @@ -475,11 +478,16 @@ namespace NUnit.Framework if (_tcIndex < _tcIDList.Count - 1) { _tcIndex = _tcIndex + 1; - _descriptionTitle.Text = "DESCRIPTION : #" + (_tcIndex); + _descriptionTitle.Text = "DESCRIPTION : #" + (_tcIndex + 1); _tcResultText.Text = _listItem[_tcIndex].Result; SetColor(_tcResultText.Text); UpdateDescriptions(); } + else if (_tcIndex == _tcIDList.Count - 1) + { + _toastMessage.Message = "This is last testcase"; + _toastMessage.Post(); + } } private void PreviousTestcase() @@ -501,11 +509,16 @@ namespace NUnit.Framework if (_tcIndex > 0) { _tcIndex = _tcIndex - 1; - _descriptionTitle.Text = "DESCRIPTION : #" + (_tcIndex); + _descriptionTitle.Text = "DESCRIPTION : #" + (_tcIndex + 1); _tcResultText.Text = _listItem[_tcIndex].Result; SetColor(_tcResultText.Text); UpdateDescriptions(); } + else if (_tcIndex == 0) + { + _toastMessage.Message = "This is first testcase"; + _toastMessage.Post(); + } } private void SetColor(string result) @@ -628,37 +641,44 @@ namespace NUnit.Framework private void MakeTCInfoList() { - foreach (KeyValuePair pair in _tunitRunner.GetTestList()) + foreach (var testcaseItem in _listItem) { - IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); - List _preconditonsStr = new List(); _preconditonsStr.Add("Preconditions:"); - List _stepsStr = new List(); _stepsStr.Add("Steps:"); - List _postconditionsStr = new List(); _postconditionsStr.Add("Postconditions:\n"); - - while (customAttributes.MoveNext()) + foreach (KeyValuePair pair in _tunitRunner.GetTestList()) { - if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) + if (testcaseItem.TCName.Equals(pair.Key)) { - _stepsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) - { - _preconditonsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) - { - _postconditionsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); + List _preconditonsStr = new List(); _preconditonsStr.Add("Preconditions:"); + List _stepsStr = new List(); _stepsStr.Add("Steps:"); + List _postconditionsStr = new List(); _postconditionsStr.Add("Postconditions:\n"); + + while (customAttributes.MoveNext()) + { + if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) + { + _stepsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) + { + _preconditonsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) + { + _postconditionsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + } + Console.WriteLine("############_tcInfoList item :{0} {1} {2} {3}", pair.Key, _preconditonsStr, _stepsStr, _postconditionsStr); + _tcInfoList.Add(new TestcaseInfo + { + TestcaseName = pair.Key, + Preconditions = _preconditonsStr, + Steps = _stepsStr, + Postconditions = _postconditionsStr, + }); + Console.WriteLine("############_tcInfoList.Count = {0}", _tcInfoList.Count); + break; } } - Console.WriteLine("############_tcInfoList item :{0} {1} {2} {3}", pair.Key, _preconditonsStr, _stepsStr, _postconditionsStr); - _tcInfoList.Add(new TestcaseInfo - { - TestcaseName = pair.Key, - Preconditions = _preconditonsStr, - Steps = _stepsStr, - Postconditions = _postconditionsStr, - }); - Console.WriteLine("############_tcInfoList.Count = {0}", _tcInfoList.Count); } } diff --git a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/WearableMainPage.cs b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/WearableMainPage.cs index 7de372ccc..69cbf7602 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/WearableMainPage.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/WearableMainPage.cs @@ -41,6 +41,7 @@ namespace NUnit.Framework private GenItemClass _resultClass; private Box _mainLayout; private Rect _square; + private List _listNotPass; public WearableMainPage() { @@ -48,14 +49,16 @@ namespace NUnit.Framework _square = _mainWindow.GetInnerSquare(); _tunitrunner = new TRunner(); _tunitrunner.LoadTestsuite(); + _listNotPass = new List(); _tcIDList = new List(); _listItem = new List(); + _listNotPass = TSettings.GetInstance().GetNotPassListManual(); int count = 0; - foreach (KeyValuePair pair in _tunitrunner.GetTestList()) + foreach (var tc in _listNotPass) { - _listItem.Add(new ItemData { No = count, TCName = pair.Key, Result = StrResult.NOTRUN }); - _tcIDList.Add(pair.Key); count++; + _listItem.Add(new ItemData { No = count, TCName = tc, Result = StrResult.NOTRUN }); + _tcIDList.Add(tc); } ResultNumber.Total = ResultNumber.NotRun = _tcIDList.Count; @@ -152,7 +155,7 @@ namespace NUnit.Framework if (_listItem.Count > 0) { RunType.Value = RunType.AUTO; - _testPage.Show(_navigationPage, 0); + _testPage.Show(_navigationPage, 1); } }; diff --git a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/WearableTestPage.cs b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/WearableTestPage.cs index da4c75e51..3b44153fb 100755 --- a/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/WearableTestPage.cs +++ b/tct-suite-vs/Tizen.ElmSharp.Manual.Tests/WearableTestPage.cs @@ -442,8 +442,8 @@ namespace NUnit.Framework public override void Show(Naviframe navigationPage, int testcaseIndex) { _navigationPage = navigationPage; - _tcIndex = testcaseIndex; - _descriptionTitle.Text = "DESCRIPTION : #" + _tcIndex; + _tcIndex = testcaseIndex - 1; + _descriptionTitle.Text = "DESCRIPTION : #" + testcaseIndex; _tcResultText.Text = _listItem[_tcIndex].Result; SetColor(_tcResultText.Text); UpdateDescriptions(); @@ -472,7 +472,7 @@ namespace NUnit.Framework if (_tcIndex < _tcIDList.Count - 1) { _tcIndex = _tcIndex + 1; - _descriptionTitle.Text = "DESCRIPTION : #" + (_tcIndex); + _descriptionTitle.Text = "DESCRIPTION : #" + (_tcIndex + 1); _tcResultText.Text = _listItem[_tcIndex].Result; SetColor(_tcResultText.Text); UpdateDescriptions(); @@ -498,7 +498,7 @@ namespace NUnit.Framework if (_tcIndex > 0) { _tcIndex = _tcIndex - 1; - _descriptionTitle.Text = "DESCRIPTION : #" + (_tcIndex); + _descriptionTitle.Text = "DESCRIPTION : #" + (_tcIndex + 1); _tcResultText.Text = _listItem[_tcIndex].Result; SetColor(_tcResultText.Text); UpdateDescriptions(); @@ -625,37 +625,44 @@ namespace NUnit.Framework private void MakeTCInfoList() { - foreach (KeyValuePair pair in _tunitRunner.GetTestList()) + foreach (var testcaseItem in _listItem) { - IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); - List _preconditonsStr = new List(); _preconditonsStr.Add("Preconditions:"); - List _stepsStr = new List(); _stepsStr.Add("Steps:"); - List _postconditionsStr = new List(); _postconditionsStr.Add("Postconditions:\n"); - - while (customAttributes.MoveNext()) + foreach (KeyValuePair pair in _tunitRunner.GetTestList()) { - if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) - { - _stepsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) + if (testcaseItem.TCName.Equals(pair.Key)) { - _preconditonsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) - { - _postconditionsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); + List _preconditonsStr = new List(); _preconditonsStr.Add("Preconditions:"); + List _stepsStr = new List(); _stepsStr.Add("Steps:"); + List _postconditionsStr = new List(); _postconditionsStr.Add("Postconditions:\n"); + + while (customAttributes.MoveNext()) + { + if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) + { + _stepsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) + { + _preconditonsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) + { + _postconditionsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + } + Console.WriteLine("############_tcInfoList item :{0} {1} {2} {3}", pair.Key, _preconditonsStr, _stepsStr, _postconditionsStr); + _tcInfoList.Add(new TestcaseInfo + { + TestcaseName = pair.Key, + Preconditions = _preconditonsStr, + Steps = _stepsStr, + Postconditions = _postconditionsStr, + }); + Console.WriteLine("############_tcInfoList.Count = {0}", _tcInfoList.Count); + break; } } - Console.WriteLine("############_tcInfoList item :{0} {1} {2} {3}", pair.Key, _preconditonsStr, _stepsStr, _postconditionsStr); - _tcInfoList.Add(new TestcaseInfo - { - TestcaseName = pair.Key, - Preconditions = _preconditonsStr, - Steps = _stepsStr, - Postconditions = _postconditionsStr, - }); - Console.WriteLine("############_tcInfoList.Count = {0}", _tcInfoList.Count); } } diff --git a/tct-suite-vs/Tizen.ElmSharpWearable.Manual.Tests/MainPage.cs b/tct-suite-vs/Tizen.ElmSharpWearable.Manual.Tests/MainPage.cs index 36e64f3c2..f5655a5dd 100755 --- a/tct-suite-vs/Tizen.ElmSharpWearable.Manual.Tests/MainPage.cs +++ b/tct-suite-vs/Tizen.ElmSharpWearable.Manual.Tests/MainPage.cs @@ -43,6 +43,7 @@ namespace NUnit.Framework private GenItemClass _resultClass; private Box _mainLayout; private Rect _square; + private List _listNotPass; public static MainPage GetInstance() { @@ -63,14 +64,16 @@ namespace NUnit.Framework _square = _mainWindow.GetInnerSquare(); _tunitrunner = new TRunner(); _tunitrunner.LoadTestsuite(); + _listNotPass = new List(); _tcIDList = new List(); _listItem = new List(); + _listNotPass = TSettings.GetInstance().GetNotPassListManual(); int count = 0; - foreach (KeyValuePair pair in _tunitrunner.GetTestList()) + foreach (var tc in _listNotPass) { - _listItem.Add(new ItemData { No = count, TCName = pair.Key, Result = StrResult.NOTRUN }); - _tcIDList.Add(pair.Key); count++; + _listItem.Add(new ItemData { No = count, TCName = tc, Result = StrResult.NOTRUN }); + _tcIDList.Add(tc); } ResultNumber.Total = ResultNumber.NotRun = _tcIDList.Count; @@ -167,7 +170,7 @@ namespace NUnit.Framework if (_listItem.Count > 0) { RunType.Value = RunType.AUTO; - _testPage.Show(_navigationPage, 0); + _testPage.Show(_navigationPage, 1); } }; diff --git a/tct-suite-vs/Tizen.ElmSharpWearable.Manual.Tests/TestPage.cs b/tct-suite-vs/Tizen.ElmSharpWearable.Manual.Tests/TestPage.cs index 6f39c2c47..8fc92a6f7 100755 --- a/tct-suite-vs/Tizen.ElmSharpWearable.Manual.Tests/TestPage.cs +++ b/tct-suite-vs/Tizen.ElmSharpWearable.Manual.Tests/TestPage.cs @@ -23,6 +23,7 @@ using System.Reflection; using ElmSharpApplication.Tizen; using ElmSharp; using Tizen; +using Tizen.Applications; namespace NUnit.Framework { @@ -470,8 +471,8 @@ namespace NUnit.Framework public void Show(Naviframe navigationPage, int testcaseIndex) { _navigationPage = navigationPage; - _tcIndex = testcaseIndex; - _descriptionTitle.Text = "DESCRIPTION : #" + _tcIndex; + _tcIndex = testcaseIndex - 1; + _descriptionTitle.Text = "DESCRIPTION : #" + testcaseIndex; _tcResultText.Text = _listItem[_tcIndex].Result; SetColor(_tcResultText.Text); UpdateDescriptions(); @@ -653,37 +654,44 @@ namespace NUnit.Framework private void MakeTCInfoList() { - foreach (KeyValuePair pair in _tunitRunner.GetTestList()) + foreach (var testcaseItem in _listItem) { - IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); - List _preconditonsStr = new List(); _preconditonsStr.Add("Preconditions:"); - List _stepsStr = new List(); _stepsStr.Add("Steps:"); - List _postconditionsStr = new List(); _postconditionsStr.Add("Postconditions:\n"); - - while (customAttributes.MoveNext()) + foreach (KeyValuePair pair in _tunitRunner.GetTestList()) { - if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) - { - _stepsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) + if (testcaseItem.TCName.Equals(pair.Key)) { - _preconditonsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) - { - _postconditionsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); + List _preconditonsStr = new List(); _preconditonsStr.Add("Preconditions:"); + List _stepsStr = new List(); _stepsStr.Add("Steps:"); + List _postconditionsStr = new List(); _postconditionsStr.Add("Postconditions:\n"); + + while (customAttributes.MoveNext()) + { + if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) + { + _stepsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) + { + _preconditonsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) + { + _postconditionsStr.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + } + Console.WriteLine("############_tcInfoList item :{0} {1} {2} {3}", pair.Key, _preconditonsStr, _stepsStr, _postconditionsStr); + _tcInfoList.Add(new TestcaseInfo + { + TestcaseName = pair.Key, + Preconditions = _preconditonsStr, + Steps = _stepsStr, + Postconditions = _postconditionsStr, + }); + Console.WriteLine("############_tcInfoList.Count = {0}", _tcInfoList.Count); + break; } } - Console.WriteLine("############_tcInfoList item :{0} {1} {2} {3}", pair.Key, _preconditonsStr, _stepsStr, _postconditionsStr); - _tcInfoList.Add(new TestcaseInfo - { - TestcaseName = pair.Key, - Preconditions = _preconditonsStr, - Steps = _stepsStr, - Postconditions = _postconditionsStr, - }); - Console.WriteLine("############_tcInfoList.Count = {0}", _tcInfoList.Count); } } diff --git a/tct-suite-vs/Tizen.NUI.Manual.Tests/ManualTestPage.cs b/tct-suite-vs/Tizen.NUI.Manual.Tests/ManualTestPage.cs index fe0198e28..570c131e8 100755 --- a/tct-suite-vs/Tizen.NUI.Manual.Tests/ManualTestPage.cs +++ b/tct-suite-vs/Tizen.NUI.Manual.Tests/ManualTestPage.cs @@ -24,6 +24,7 @@ using NUnit.Framework.TUnit; using System.Reflection; using Tizen.NUI.BaseComponents; using Tizen.NUI.UIComponents; +using Tizen.Applications; namespace Tizen.NUI.Tests { @@ -39,6 +40,8 @@ namespace Tizen.NUI.Tests private const string STEP_ATTRIBUTE_NAME = "NUnit.Framework.StepAttribute"; private const string PRECONDITION_ATTRIBUTE_NAME = "NUnit.Framework.PreconditionAttribute"; private const string POSTCONDITION_ATTRIBUTE_NAME = "NUnit.Framework.PostconditionAttribute"; + private List _listNotPass; + private ToastMessage _toastMessage; //For TV KantM //private static float PointSize = 30.0f; //private static float ButtonSizeWidth = 200; @@ -94,19 +97,22 @@ namespace Tizen.NUI.Tests } public void Initialize() { - Tizen.Log.Fatal("NUI", "NUI Initialize"); + Tizen.Log.Fatal("NUI", "Initialize========================================="); + _toastMessage = new ToastMessage(); PointSize = (1.0f / Window.Instance.Dpi.Length()) * 2000.0f; RunType.Value = RunType.MANUAL; _tRunner = new TRunner(); _tRunner.LoadTestsuite(); _tRunner.SingleTestDone += OnSingleTestDone; + _listNotPass = new List(); _tcIDList = new List(); _listItem = new List(); + _listNotPass = TSettings.GetInstance().GetNotPassListManual(); int count = 0; - foreach (KeyValuePair pair in _tRunner.GetTestList()) + foreach (var tc in _listNotPass) { - _listItem.Add(new ItemData { No = count, TCName = pair.Key, Result = StrResult.NOTRUN }); - _tcIDList.Add(pair.Key); + _listItem.Add(new ItemData { No = count, TCName = tc, Result = StrResult.NOTRUN }); + _tcIDList.Add(tc); count++; } Tizen.Log.Fatal("NUI", "TCT : count:" + count.ToString()); @@ -406,6 +412,11 @@ namespace Tizen.NUI.Tests ManualTest.Confirm(); UpdateDetailPage(); } + else if (CurrentTCNum == 0) + { + _toastMessage.Message = "This is first testcase"; + _toastMessage.Post(); + } } return true; }; @@ -427,6 +438,11 @@ namespace Tizen.NUI.Tests notRun.Text = _listItem[CurrentTCNum].Result; UpdateDetailPage(); } + else if (CurrentTCNum + 1 == ResultNumber.Total) + { + _toastMessage.Message = "This is last testcase"; + _toastMessage.Post(); + } return true; }; @@ -604,39 +620,46 @@ namespace Tizen.NUI.Tests ResultNumber.Fail = 0; ResultNumber.Block = 0; TCInfoList = new List(); - foreach (KeyValuePair pair in _tRunner.GetTestList()) + foreach (var testcaseItem in _listItem) { - List preconditions = new List(); - preconditions.Add("Preconditions:"); - List steps = new List(); - steps.Add("Steps:"); - List postconditions = new List(); - postconditions.Add("Postconditions:\n"); - IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); - while (customAttributes.MoveNext()) + foreach (KeyValuePair pair in _tRunner.GetTestList()) { - if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) - { - steps.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) - { - preconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) + if (testcaseItem.TCName.Equals(pair.Key)) { - postconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + List preconditions = new List(); + preconditions.Add("Preconditions:"); + List steps = new List(); + steps.Add("Steps:"); + List postconditions = new List(); + postconditions.Add("Postconditions:\n"); + IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); + while (customAttributes.MoveNext()) + { + if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) + { + steps.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) + { + preconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) + { + postconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + } + TCInfoList.Add(new TestcaseInfo + { + TestcaseName = pair.Key, + Preconditions = preconditions, + Steps = steps, + Postconditions = postconditions, + }); + break; } } - TCInfoList.Add(new TestcaseInfo - { - TestcaseName = pair.Key, - Preconditions = preconditions, - Steps = steps , - Postconditions = postconditions, - }); + UpdateCurrentTCInfo(); } - UpdateCurrentTCInfo(); } //The data in CurrentTCInfo list will be show in _detailList. diff --git a/tct-suite-vs/Tizen.NUI.Manual.Tests/WearableManualTestPage.cs b/tct-suite-vs/Tizen.NUI.Manual.Tests/WearableManualTestPage.cs index 5b06415c9..18051c0cf 100755 --- a/tct-suite-vs/Tizen.NUI.Manual.Tests/WearableManualTestPage.cs +++ b/tct-suite-vs/Tizen.NUI.Manual.Tests/WearableManualTestPage.cs @@ -39,7 +39,7 @@ namespace Tizen.NUI.Tests private const string STEP_ATTRIBUTE_NAME = "NUnit.Framework.StepAttribute"; private const string PRECONDITION_ATTRIBUTE_NAME = "NUnit.Framework.PreconditionAttribute"; private const string POSTCONDITION_ATTRIBUTE_NAME = "NUnit.Framework.PostconditionAttribute"; - + private List _listNotPass; private static float PointSize = 5.0f; //Save the information of every single test case @@ -98,13 +98,15 @@ namespace Tizen.NUI.Tests _tRunner = new TRunner(); _tRunner.LoadTestsuite(); _tRunner.SingleTestDone += OnSingleTestDone; + _listNotPass = new List(); _tcIDList = new List(); _listItem = new List(); + _listNotPass = TSettings.GetInstance().GetNotPassListManual(); int count = 0; - foreach (KeyValuePair pair in _tRunner.GetTestList()) + foreach (var tc in _listNotPass) { - _listItem.Add(new ItemData { No = count, TCName = pair.Key, Result = StrResult.NOTRUN }); - _tcIDList.Add(pair.Key); + _listItem.Add(new ItemData { No = count, TCName = tc, Result = StrResult.NOTRUN }); + _tcIDList.Add(tc); count++; } Tizen.Log.Fatal("NUI", "TCT : count:" + count.ToString()); @@ -640,39 +642,46 @@ namespace Tizen.NUI.Tests ResultNumber.Fail = 0; ResultNumber.Block = 0; TCInfoList = new List(); - foreach (KeyValuePair pair in _tRunner.GetTestList()) + foreach (var testcaseItem in _listItem) { - List preconditions = new List(); - preconditions.Add("Preconditions:"); - List steps = new List(); - steps.Add("Steps:"); - List postconditions = new List(); - postconditions.Add("Postconditions:\n"); - IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); - while (customAttributes.MoveNext()) + foreach (KeyValuePair pair in _tRunner.GetTestList()) { - if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) - { - steps.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) + if (testcaseItem.TCName.Equals(pair.Key)) { - preconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); - } - else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) - { - postconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + List preconditions = new List(); + preconditions.Add("Preconditions:"); + List steps = new List(); + steps.Add("Steps:"); + List postconditions = new List(); + postconditions.Add("Postconditions:\n"); + IEnumerator customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator(); + while (customAttributes.MoveNext()) + { + if (customAttributes.Current.AttributeType.FullName.Equals(STEP_ATTRIBUTE_NAME)) + { + steps.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(PRECONDITION_ATTRIBUTE_NAME)) + { + preconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + else if (customAttributes.Current.AttributeType.FullName.Equals(POSTCONDITION_ATTRIBUTE_NAME)) + { + postconditions.Add(customAttributes.Current.ConstructorArguments[0].Value + "." + customAttributes.Current.ConstructorArguments[1].Value); + } + } + TCInfoList.Add(new TestcaseInfo + { + TestcaseName = pair.Key, + Preconditions = preconditions, + Steps = steps, + Postconditions = postconditions, + }); + break; } } - TCInfoList.Add(new TestcaseInfo - { - TestcaseName = pair.Key, - Preconditions = preconditions, - Steps = steps , - Postconditions = postconditions, - }); + UpdateCurrentTCInfo(); } - UpdateCurrentTCInfo(); } //The data in CurrentTCInfo list will be show in _detailList.