public override bool ImportSelectedTests(string importDestinationPath, IEnumerable <object> selectedTests) { if (selectedTests != null && selectedTests.Count() > 0) { ObservableList <JiraTestSet> testSetsItemsToImport = new ObservableList <JiraTestSet>(); foreach (GingerCore.ALM.JIRA.JiraTestSet selectedTS in selectedTests) { try { BusinessFlow existedBF = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <BusinessFlow>().Where(x => x.ExternalID == selectedTS.Key).FirstOrDefault(); if (existedBF != null) { Amdocs.Ginger.Common.eUserMsgSelection userSelection = Reporter.ToUser(eUserMsgKey.TestSetExists, selectedTS.Name); if (userSelection == Amdocs.Ginger.Common.eUserMsgSelection.Yes) { File.Delete(existedBF.FileName); } } Reporter.ToStatus(eStatusMsgKey.ALMTestSetImport, null, selectedTS.Name); JiraTestSet jiraImportedTSData = ((JiraCore)this.AlmCore).GetJiraTestSetData(selectedTS); SetImportedTS(jiraImportedTSData); } catch (Exception ex) { Reporter.ToUser(eUserMsgKey.ErrorInTestsetImport, selectedTS.Name, ex.Message); } } Reporter.ToUser(eUserMsgKey.TestSetsImportedSuccessfully); return(true); } return(false); }
public JiraImportReviewPage(JiraTestSet testSet = null, string importDestinationPath = "") { InitializeComponent(); mTestSet = testSet; mImportDestinationPath = importDestinationPath; SetGridView(); SetGridData(); }
private void SetImportedTS(JiraTestSet importedTS, string importDestinationPath) { ALMIntegration.Instance.AlmCore.InitCoreObjs(); try { //import test set data Reporter.ToStatus(eStatusMsgKey.ALMTestSetImport, null, importedTS.Name); BusinessFlow tsBusFlow = ((JiraCore)ALMIntegration.Instance.AlmCore).ConvertJiraTestSetToBF(importedTS); SetBFPropertiesAfterImport(tsBusFlow); //save bf AddTestSetFlowToFolder(tsBusFlow, importDestinationPath); Reporter.HideStatusMessage(); } catch { } }
private void SetImportedTS(JiraTestSet importedTS) { ALMIntegration.Instance.AlmCore.GingerActivitiesGroupsRepo = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <ActivitiesGroup>(); ALMIntegration.Instance.AlmCore.GingerActivitiesRepo = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <Activity>(); try { //import test set data Reporter.ToStatus(eStatusMsgKey.ALMTestSetImport, null, importedTS.Name); BusinessFlow tsBusFlow = ((JiraCore)ALMIntegration.Instance.AlmCore).ConvertJiraTestSetToBF(importedTS); SetBFPropertiesAfterImport(tsBusFlow); //save bf WorkSpace.Instance.SolutionRepository.AddRepositoryItem(tsBusFlow); Reporter.HideStatusMessage(); } catch { } }
public BusinessFlow ConvertJiraTestSetToBF(JiraTestSet testSet) { return(jiraImportObj.ConvertJiraTestSetToBF(testSet)); }
public JiraTestSet GetJiraTestSetData(JiraTestSet selectedTS) { return(jiraImportObj.GetTestSetData(selectedTS)); }