Ejemplo n.º 1
0
        public void AddCasePriority(int priority, TestCaseDescription testCase)
        {
            if (!TestCasePriority.ContainsKey(priority))
            {
                TestCasePriority[priority] = new HashSet <TestCaseDescription>();
            }

            TestCasePriority[priority].Add(testCase);
        }
Ejemplo n.º 2
0
        public void Initialize(ITestPlan testPlan, ITestManagementTeamProject testProject, string tfsUrl, string project)
        {
            ITestPointCollection testPlanPoints = testPlan.QueryTestPoints("SELECT * FROM TestPoint");

            dataSet = new DataSet();

            foreach (ITestPoint item in testPlanPoints)
            {
                int    priority     = item.TestCaseWorkItem.Priority;
                string testCasePath = string.Format(TestCasePath, item.Plan.Id, item.SuiteId);
                string testCaseUrl  = string.Format(TestCaseUrlBase, tfsUrl, project, testCasePath);
                TestCaseDescription testCaseDescription = new TestCaseDescription(item, testCaseUrl, testCasePath);

                dataSet.AddCasePriority(priority, testCaseDescription);

                if (item.IsTestCaseAutomated)
                {
                    dataSet.Automated.Add(testCaseDescription);
                }

                switch (item.State)
                {
                case TestPointState.InProgress:
                    dataSet.InProgress.Add(testCaseDescription);
                    break;

                case TestPointState.Ready:
                    dataSet.Ready.Add(testCaseDescription);
                    break;

                case TestPointState.Completed:
                    dataSet.Complete.Add(testCaseDescription);
                    break;
                }

                switch (item.AssignedToName)
                {
                case "Unassigned":
                    dataSet.Unassigned.Add(testCaseDescription);
                    break;

                case "Automation User":
                    dataSet.Automated.Add(testCaseDescription);
                    break;

                default:
                    dataSet.Assigned.Add(testCaseDescription);
                    break;
                }
            }

            DatasetChanged();
        }