public override string SelectALMTestPlanPath() { //show Test Plan browser for selecting the Path ZephyrEntRepositoryExplorerPage win = new ZephyrEntRepositoryExplorerPage(); return(win.ShowAsWindow(eWindowShowStyle.Dialog)); }
public override bool ExportActivitiesGroupToALM(ActivitiesGroup activtiesGroup, string uploadPath, bool performSaveAfterExport, BusinessFlow businessFlow = null) { TestCaseResource currentTC; if (activtiesGroup == null) { return(false); } //if it is called from shared repository need to select path if (uploadPath == null) { ZephyrEntRepositoryExplorerPage win = new ZephyrEntRepositoryExplorerPage(); win.xCreateBusinessFlowFolder.Visibility = Visibility.Collapsed;//no need to create separate folder uploadPath = win.ShowAsWindow(eWindowShowStyle.Dialog); } //upload the Activities Group Reporter.ToStatus(eStatusMsgKey.ExportItemToALM, null, activtiesGroup.Name); if (matchingTC == null) { ObservableList <ExternalItemFieldBase> allFields = new ObservableList <ExternalItemFieldBase>(WorkSpace.Instance.Solution.ExternalItemsFields); ALMIntegration.Instance.RefreshALMItemFields(allFields, true, null); Dictionary <string, string> testInstanceFields = CleanUnrelvantFields(allFields, EntityName.testcase); Reporter.ToLog(eLogLevel.INFO, "Starting export to Zephyr Ent"); currentTC = ((ZephyrEntCore)ALMIntegration.Instance.AlmCore).CreateTestCase(Convert.ToInt64(uploadPath), activtiesGroup, testInstanceFields); // Check if BF already exist and Mapped new TC to Zephyr TS if (!String.IsNullOrEmpty(businessFlow.ExternalID)) { ((ZephyrEntCore)ALMIntegration.Instance.AlmCore).AssigningTestCasesToCyclePhase(new List <long>() { currentTC.id }, Convert.ToInt64(businessFlow.ExternalID2), Convert.ToInt64(businessFlow.ExternalID)); } } else { currentTC = ((ZephyrEntCore)ALMIntegration.Instance.AlmCore).UpdateTestCase(Convert.ToInt64(uploadPath), activtiesGroup, matchingTC); } Reporter.HideStatusMessage(); if (currentTC != null) { if (performSaveAfterExport) { Reporter.ToStatus(eStatusMsgKey.SaveItem, null, activtiesGroup.Name, GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroup)); WorkSpace.Instance.SolutionRepository.SaveRepositoryItem(activtiesGroup); Reporter.HideStatusMessage(); } tcsRepositoryList.Add(currentTC); return(true); } else { Reporter.ToUser(eUserMsgKey.ExportItemToALMFailed, GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroup), activtiesGroup.Name, false); } return(false); }