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) { // } }
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 { // } }