private GenList _listView;
private GenItemClass _resultClass;
private Box _mainLayout;
+ private List<string> _listNotPass;
public DefaultMainPage()
{
_mainWindow = MainWindow.GetInstance();
_tunitrunner = new TRunner();
_tunitrunner.LoadTestsuite();
+ _listNotPass = new List<string>();
_tcIDList = new List<string>();
_listItem = new List<ItemData>();
+ _listNotPass = TSettings.GetInstance().GetNotPassListManual();
int count = 0;
- foreach (KeyValuePair<string, ITest> 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;
if (_listItem.Count > 0)
{
RunType.Value = RunType.AUTO;
- _testPage.Show(_navigationPage, 0);
+ _testPage.Show(_navigationPage, 1);
}
};
using ElmSharpApplication.Tizen;
using ElmSharp;
using ElmSharp.Tests;
+using Tizen.Applications;
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";
public override void Initialize(TRunner tunitRunner, List<string> testcaseIDList, List<ItemData> listItem, List<GenListItem> resultListItems, GenItemClass resultClass)
{
+ _toastMessage = new ToastMessage();
RunType.Value = RunType.MANUAL;
_tunitRunner = tunitRunner;
_tunitRunner.SingleTestDone += OnSingleTestDone;
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();
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()
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)
private void MakeTCInfoList()
{
- foreach (KeyValuePair<string, ITest> pair in _tunitRunner.GetTestList())
+ foreach (var testcaseItem in _listItem)
{
- IEnumerator<CustomAttributeData> customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator();
- List<string> _preconditonsStr = new List<string>(); _preconditonsStr.Add("Preconditions:");
- List<string> _stepsStr = new List<string>(); _stepsStr.Add("Steps:");
- List<string> _postconditionsStr = new List<string>(); _postconditionsStr.Add("Postconditions:\n");
-
- while (customAttributes.MoveNext())
+ foreach (KeyValuePair<string, ITest> 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<CustomAttributeData> customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator();
+ List<string> _preconditonsStr = new List<string>(); _preconditonsStr.Add("Preconditions:");
+ List<string> _stepsStr = new List<string>(); _stepsStr.Add("Steps:");
+ List<string> _postconditionsStr = new List<string>(); _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);
}
}
private GenItemClass _resultClass;
private Box _mainLayout;
private Rect _square;
+ private List<string> _listNotPass;
public WearableMainPage()
{
_square = _mainWindow.GetInnerSquare();
_tunitrunner = new TRunner();
_tunitrunner.LoadTestsuite();
+ _listNotPass = new List<string>();
_tcIDList = new List<string>();
_listItem = new List<ItemData>();
+ _listNotPass = TSettings.GetInstance().GetNotPassListManual();
int count = 0;
- foreach (KeyValuePair<string, ITest> 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;
if (_listItem.Count > 0)
{
RunType.Value = RunType.AUTO;
- _testPage.Show(_navigationPage, 0);
+ _testPage.Show(_navigationPage, 1);
}
};
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();
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();
if (_tcIndex > 0)
{
_tcIndex = _tcIndex - 1;
- _descriptionTitle.Text = "DESCRIPTION : #" + (_tcIndex);
+ _descriptionTitle.Text = "DESCRIPTION : #" + (_tcIndex + 1);
_tcResultText.Text = _listItem[_tcIndex].Result;
SetColor(_tcResultText.Text);
UpdateDescriptions();
private void MakeTCInfoList()
{
- foreach (KeyValuePair<string, ITest> pair in _tunitRunner.GetTestList())
+ foreach (var testcaseItem in _listItem)
{
- IEnumerator<CustomAttributeData> customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator();
- List<string> _preconditonsStr = new List<string>(); _preconditonsStr.Add("Preconditions:");
- List<string> _stepsStr = new List<string>(); _stepsStr.Add("Steps:");
- List<string> _postconditionsStr = new List<string>(); _postconditionsStr.Add("Postconditions:\n");
-
- while (customAttributes.MoveNext())
+ foreach (KeyValuePair<string, ITest> 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<CustomAttributeData> customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator();
+ List<string> _preconditonsStr = new List<string>(); _preconditonsStr.Add("Preconditions:");
+ List<string> _stepsStr = new List<string>(); _stepsStr.Add("Steps:");
+ List<string> _postconditionsStr = new List<string>(); _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);
}
}
private GenItemClass _resultClass;
private Box _mainLayout;
private Rect _square;
+ private List<string> _listNotPass;
public static MainPage GetInstance()
{
_square = _mainWindow.GetInnerSquare();
_tunitrunner = new TRunner();
_tunitrunner.LoadTestsuite();
+ _listNotPass = new List<string>();
_tcIDList = new List<string>();
_listItem = new List<ItemData>();
+ _listNotPass = TSettings.GetInstance().GetNotPassListManual();
int count = 0;
- foreach (KeyValuePair<string, ITest> 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;
if (_listItem.Count > 0)
{
RunType.Value = RunType.AUTO;
- _testPage.Show(_navigationPage, 0);
+ _testPage.Show(_navigationPage, 1);
}
};
using ElmSharpApplication.Tizen;
using ElmSharp;
using Tizen;
+using Tizen.Applications;
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();
private void MakeTCInfoList()
{
- foreach (KeyValuePair<string, ITest> pair in _tunitRunner.GetTestList())
+ foreach (var testcaseItem in _listItem)
{
- IEnumerator<CustomAttributeData> customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator();
- List<string> _preconditonsStr = new List<string>(); _preconditonsStr.Add("Preconditions:");
- List<string> _stepsStr = new List<string>(); _stepsStr.Add("Steps:");
- List<string> _postconditionsStr = new List<string>(); _postconditionsStr.Add("Postconditions:\n");
-
- while (customAttributes.MoveNext())
+ foreach (KeyValuePair<string, ITest> 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<CustomAttributeData> customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator();
+ List<string> _preconditonsStr = new List<string>(); _preconditonsStr.Add("Preconditions:");
+ List<string> _stepsStr = new List<string>(); _stepsStr.Add("Steps:");
+ List<string> _postconditionsStr = new List<string>(); _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);
}
}
using System.Reflection;
using Tizen.NUI.BaseComponents;
using Tizen.NUI.UIComponents;
+using Tizen.Applications;
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<string> _listNotPass;
+ private ToastMessage _toastMessage;
//For TV KantM
//private static float PointSize = 30.0f;
//private static float ButtonSizeWidth = 200;
}
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<string>();
_tcIDList = new List<string>();
_listItem = new List<ItemData>();
+ _listNotPass = TSettings.GetInstance().GetNotPassListManual();
int count = 0;
- foreach (KeyValuePair<string, ITest> 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());
ManualTest.Confirm();
UpdateDetailPage();
}
+ else if (CurrentTCNum == 0)
+ {
+ _toastMessage.Message = "This is first testcase";
+ _toastMessage.Post();
+ }
}
return true;
};
notRun.Text = _listItem[CurrentTCNum].Result;
UpdateDetailPage();
}
+ else if (CurrentTCNum + 1 == ResultNumber.Total)
+ {
+ _toastMessage.Message = "This is last testcase";
+ _toastMessage.Post();
+ }
return true;
};
ResultNumber.Fail = 0;
ResultNumber.Block = 0;
TCInfoList = new List<TestcaseInfo>();
- foreach (KeyValuePair<string, ITest> pair in _tRunner.GetTestList())
+ foreach (var testcaseItem in _listItem)
{
- List<string> preconditions = new List<string>();
- preconditions.Add("Preconditions:");
- List<string> steps = new List<string>();
- steps.Add("Steps:");
- List<string> postconditions = new List<string>();
- postconditions.Add("Postconditions:\n");
- IEnumerator<CustomAttributeData> customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator();
- while (customAttributes.MoveNext())
+ foreach (KeyValuePair<string, ITest> 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<string> preconditions = new List<string>();
+ preconditions.Add("Preconditions:");
+ List<string> steps = new List<string>();
+ steps.Add("Steps:");
+ List<string> postconditions = new List<string>();
+ postconditions.Add("Postconditions:\n");
+ IEnumerator<CustomAttributeData> 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.
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<string> _listNotPass;
private static float PointSize = 5.0f;
//Save the information of every single test case
_tRunner = new TRunner();
_tRunner.LoadTestsuite();
_tRunner.SingleTestDone += OnSingleTestDone;
+ _listNotPass = new List<string>();
_tcIDList = new List<string>();
_listItem = new List<ItemData>();
+ _listNotPass = TSettings.GetInstance().GetNotPassListManual();
int count = 0;
- foreach (KeyValuePair<string, ITest> 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());
ResultNumber.Fail = 0;
ResultNumber.Block = 0;
TCInfoList = new List<TestcaseInfo>();
- foreach (KeyValuePair<string, ITest> pair in _tRunner.GetTestList())
+ foreach (var testcaseItem in _listItem)
{
- List<string> preconditions = new List<string>();
- preconditions.Add("Preconditions:");
- List<string> steps = new List<string>();
- steps.Add("Steps:");
- List<string> postconditions = new List<string>();
- postconditions.Add("Postconditions:\n");
- IEnumerator<CustomAttributeData> customAttributes = pair.Value.Method.MethodInfo.CustomAttributes.GetEnumerator();
- while (customAttributes.MoveNext())
+ foreach (KeyValuePair<string, ITest> 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<string> preconditions = new List<string>();
+ preconditions.Add("Preconditions:");
+ List<string> steps = new List<string>();
+ steps.Add("Steps:");
+ List<string> postconditions = new List<string>();
+ postconditions.Add("Postconditions:\n");
+ IEnumerator<CustomAttributeData> 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.