private TestCaseResult GetTestCaseResult(XmlNode node) { string testCaseName = node.SelectSingleNode("TestCaseName").InnerText; TestCaseResult retTestCaseResult = new TestCaseResult(testCaseName); XmlNode testStepResultsXml = node.SelectSingleNode("TestStepResults"); TestStepResults res = GetListOfTestStepResult(testStepResultsXml); retTestCaseResult.Add(res); return(retTestCaseResult); }
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); }
static void Main(string[] args) { var tc1Step1 = new TestStepResult("Test step 1", true); var tc2step2 = new TestStepResult("Test step 2", false); var tc3step3 = new TestStepResult("Test step 3", true); TestStepResults results = new TestStepResults(); results.Add(tc1Step1); results.Add(tc2step2); results.Add(tc3step3); TestCaseResult caseresult = new TestCaseResult("a sample description"); TestCaseResults caseresults = new TestCaseResults(); TestRun run = new TestRun("25/2/2020", "RETRER2134", "12345"); }
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); }
public void Add(TestCaseResult result) { _result.Add(result); }