Beispiel #1
0
        private TestCaseResults GetTestCaseResults()
        {
            TestCaseResults retTestCaseResults = new TestCaseResults();
            XmlNodeList     testCaseResults    = docxml.SelectNodes("//TestRun/TestCaseResults/TestCaseResult");

            foreach (XmlNode node in testCaseResults)
            {
                TestCaseResult res = GetTestCaseResult(node);
                retTestCaseResults.Add(res);
            }
            return(retTestCaseResults);
        }
Beispiel #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);
        }