public void GetTestCaseAssignedTester() { var testPlan = testlink.getTestPlanByName("CMGE", "integration-test-plan"); var testcases = testlink.GetTestCasesForTestPlan(testPlan.id); var builds = testlink.GetBuildsForTestPlan(testPlan.id); var platforms = testlink.GetTestPlanPlatforms(testPlan.id); foreach (var tc in testcases) { foreach (var p in platforms) { foreach (var b in builds) { var tester = testlink.GetTestCaseAssignedTester(testPlan.id, tc.tc_id, p.id, b.id); _testOutputHelper.WriteLine(tester); } } } }
public TestPlan SetPlan() { try { _testPlan = _apiAdapter.getTestPlanByName(_projectName, _testPlanName); return(_testPlan); } catch (TestCaseException exception) { throw exception; } }
public void ReportTCResultTest() { var testPlan = testlink.getTestPlanByName("CMGE", "dev-nunit-test-plan"); var testCases = testlink.GetTestCasesForTestPlan(testPlan.id); var testCase = testCases.Last(); testlink.ReportTCResult(testCase.tc_id, testPlan.id, TestCaseStatus.Failed, testCase.platform_id, testCase.platform_name, true, true, "notes"); var result = testlink.GetLastExecutionResult(testPlan.id, testCase.tc_id); Assert.AreEqual("f", result.status); testlink.ReportTCResult(testCase.tc_id, testPlan.id, TestCaseStatus.Passed, testCase.platform_id, testCase.platform_name, true, true, "notes"); result = testlink.GetLastExecutionResult(testPlan.id, testCase.tc_id); Assert.AreEqual("p", result.status); }
protected void TestLinkInitialize() { try { tl = new TestLink("f71e80e4c23bba99dfedf1b442bb42f5", "http://172.30.2.44/testlink/lib/api/xmlrpc.php"); testPlanId = tl.getTestPlanByName(ProjectName, PlanName).id; if (tl.GetBuildsForTestPlan(testPlanId).FirstOrDefault(x => x.name == buildName) == null) { tl.CreateBuild(testPlanId, buildName, "Build created by script"); } buildId = tl.GetBuildsForTestPlan(testPlanId).FirstOrDefault(x => x.name == buildName).id; } catch (Exception ex) { // } }
public void ProcessResult( string currentTestCaseName, string testProject, string testPlan, string status, string executionNotes ) { try { //var currentTestCaseName = testContext.ScenarioInfo.Description.Replace("\t", ""); //Getting the test case based on test project, test suite, test plan var testPlanRepository = _testLink.getTestPlanByName(testProject, testPlan); var testCasesOfTestPlan = _testLink.GetTestCasesForTestPlan(testPlanRepository.id); var currentTestCaseRepository = _testLink.GetTestCaseIDByName(currentTestCaseName).Single(); var testCaseRepository = testCasesOfTestPlan.Where(a => a.tc_id == currentTestCaseRepository.id) .ToList().FirstOrDefault(); var testCaseStatus = GetTestCaseStatus(status); if (testCaseRepository == null) { Console.WriteLine("Cannot find test case in test plan"); } else { _testLink.ReportTCResult( testCaseRepository.tc_id, testPlanRepository.id, testCaseStatus, 1, "Timon", false, true, executionNotes); } } catch (Exception e) { Console.WriteLine(e); } }
protected void TestLinkInitialize() { try { Tl = new TestLink("f71e80e4c23bba99dfedf1b442bb42f5", "http://172.30.2.44/testlink/lib/api/xmlrpc.php"); TestPlanId = Tl.getTestPlanByName(Configs.ProjectName, Configs.PlanName).id; if (Tl.GetBuildsForTestPlan(TestPlanId).FirstOrDefault(x => x.name == Configs.BuildName) == null) { Tl.CreateBuild(TestPlanId, Configs.BuildName, "Build created by script"); } Build firstOrDefault = Tl.GetBuildsForTestPlan(TestPlanId).FirstOrDefault(x => x.name == Configs.BuildName); if (firstOrDefault != null) { BuildId = firstOrDefault.id; } } catch { // } }