Esempio n. 1
0
        public void UpdateExcelDefectWithTestCaseCount()
        {
            //GetTestCasesWebApi getTestCasesWebApi = new GetTestCasesWebApi();
            //List<int> _allTestCaseIds = getTestCasesWebApi.GetAllTestCaseIds().Result;

            DateTime earliestTime = new DateTime(2019, 4, 1);

            GetDefectWithTestCaseCount getDefectWithTestCaseCount = new GetDefectWithTestCaseCount(_props);
            List <Defect> res = getDefectWithTestCaseCount.DefectTestCaseCountTFS(earliestTime);

            Console.WriteLine("BreakPoint");

            if (_props.UseWebApi == 1)
            {
                Console.Write("Writing Defects to DB... ");
                PostHelper <Defect>(res, "/api/Defect");
                Console.WriteLine();
                Console.WriteLine("Finished writing Defects to DB...");
            }
            else
            {
                Console.Write("Not using WebAPI. Not writing to DB... ");
            }

            List <TestCase> allTestCaseInSuite;

            if (_props.UseWebApi == 1)
            {
                allTestCaseInSuite = GetTestCasesWebApi.GetAllTestCases().Result;
            }
            else
            {
                GetTestCasesInSuite getTestCasesInSuite = new GetTestCasesInSuite(_props);
                allTestCaseInSuite = getTestCasesInSuite.GatherTestCases();
            }

            List <Defect> defectsFromTFS = GetDefectWebApi.GetDefects().Result;

            UpdateDefectWithTestCaseCount updateDefectWithTestCaseCount = new UpdateDefectWithTestCaseCount(_props);

            updateDefectWithTestCaseCount.UpdateDefectOnlySheet(defectsFromTFS, earliestTime, true);
            updateDefectWithTestCaseCount.UpdateTestCaseWithDefect(defectsFromTFS, allTestCaseInSuite);
            updateDefectWithTestCaseCount.UpdateTfsProposed(defectsFromTFS);
            updateDefectWithTestCaseCount.ExcelCleanup();

            //AddDefectWebApi addDefectWebApi = new AddDefectWebApi();
            //List<Defect> insertedDefects = addDefectWebApi.UpdateListDefects(res).Result;

            //Console.WriteLine(res.Count);
        }
Esempio n. 2
0
        public void UpdateExcelExecutionInputData()
        {
            List <TestCase> allTestCaseInSuite;

            if (_props.UseWebApi == 1)
            {
                allTestCaseInSuite = GetTestCasesWebApi.GetAllTestCases().Result;
            }
            else
            {
                GetTestCasesInSuite getTestCasesInSuite = new GetTestCasesInSuite(_props);
                allTestCaseInSuite = getTestCasesInSuite.GatherTestCases();
            }

            UpdateExecutionInputData updateInputData = new UpdateExecutionInputData(_props);

            updateInputData.UpdateExcelExecutionInputData(allTestCaseInSuite);

            updateInputData.ExcelCleanup();
        }