Esempio n. 1
0
        public override void ReadDetails(string xmlFileName)
        {
            docxml.Load(xmlFileName);
            XmlNode timeDate = docxml.SelectSingleNode("//TestRun/DateTime");
            XmlNode hostName = docxml.SelectSingleNode("//TestRun/HostName");
            XmlNode userId   = docxml.SelectSingleNode("//TestRun/UserId");

            _testRun = new TestRun(timeDate.InnerText, hostName.InnerText, userId.InnerText);
            var res = GetTestCaseResults();

            _testRun.Add(res);
        }
Esempio n. 2
0
        private TestRun GetFailedTestRunObj(List <TestCaseResult> failedTestCases)
        {
            _testRunFailed = new TestRun("13:23:34 3-3-2020", "INGHTBGFTR", "sdr01");
            TestCaseResults testCaseResults = new TestCaseResults();

            foreach (var testcase in failedTestCases)
            {
                TestCaseResult  testcaseRes     = new TestCaseResult(testcase.getTestCaseName());
                TestStepResults testStepResults = new TestStepResults();
                foreach (var testStepResult in testcase.GetAllTestStepResults().GetTestStepResults())
                {
                    bool isPassed = testStepResult.IsPassed();
                    if (!isPassed)
                    {
                        testStepResults.Add(testStepResult);
                    }
                }
                testcaseRes.Add(testStepResults);
                testCaseResults.Add(testcaseRes);
            }
            _testRunFailed.Add(testCaseResults);
            return(_testRunFailed);
        }