Example #1
0
        public override void SetALMConfigurations(string ALMServerUrl, bool UseRest, string ALMUserName, string ALMPassword,
                                                  string ALMDomain, string ALMProject, string ALMProjectKey, GingerCoreNET.ALMLib.ALMIntegrationEnums.eALMType almType,
                                                  string ALMConfigPackageFolderPath, bool ZephyrEntToken, GingerCoreNET.ALMLib.ALMIntegrationEnums.eTestingALMType testingALMType = GingerCoreNET.ALMLib.ALMIntegrationEnums.eTestingALMType.None)
        {
            GingerCoreNET.ALMLib.ALMConfig AlmConfig     = amdocs.ginger.GingerCoreNET.WorkSpace.Instance.Solution.ALMConfigs.FirstOrDefault(x => x.AlmType == almType);
            GingerCoreNET.ALMLib.ALMConfig AlmCoreConfig = AlmConfigs.FirstOrDefault(x => x.AlmType == almType);

            GingerCoreNET.ALMLib.ALMUserConfig CurrentAlmUserConfigurations = amdocs.ginger.GingerCoreNET.WorkSpace.Instance.UserProfile.ALMUserConfigs.FirstOrDefault(x => x.AlmType == almType);

            //if not exist add otherwise update
            if (AlmConfig == null)
            {
                AlmConfig = new GingerCoreNET.ALMLib.ALMConfig();
                AlmConfigs.Add(AlmConfig);
            }
            AlmConfig.ALMServerURL               = GetServerValueFromDict(GetDynamicServerConfigAndSetPaths());
            AlmConfig.UseRest                    = UseRest;
            AlmConfig.ALMUserName                = CurrentAlmUserConfigurations.ALMUserName;
            AlmConfig.ALMPassword                = CurrentAlmUserConfigurations.ALMPassword;
            AlmConfig.ALMDomain                  = ALMDomain;
            AlmConfig.ALMProjectName             = ALMProject;
            AlmConfig.ALMProjectKey              = ALMProjectKey;
            AlmConfig.AlmType                    = almType;
            AlmConfig.ALMConfigPackageFolderPath = amdocs.ginger.GingerCoreNET.WorkSpace.Instance.SolutionRepository.ConvertFullPathToBeRelative(ALMConfigPackageFolderPath);
            AlmConfig.JiraTestingALM             = testingALMType;

            AlmCoreConfig = AlmConfig;
        }
Example #2
0
        public void UpdateALMType(eALMType AlmType, bool isOperationAlmType = false)
        {
            GingerCoreNET.ALMLib.ALMConfig CurrentAlmConfigurations = ALMCore.GetCurrentAlmConfig(AlmType);
            ALMCore.DefaultAlmConfig = CurrentAlmConfigurations;
            switch (AlmType)
            {
            case eALMType.QC:
                if (!CurrentAlmConfigurations.UseRest)
                {
                    AlmCore = new QCCore();
                    AlmRepo = new QCRepository();
                }
                else
                {
                    AlmCore = new QCRestAPICore();
                    AlmRepo = new QCRestAPIRepository();
                }
                break;

            case eALMType.RQM:
                AlmCore = new RQMCore();
                AlmRepo = new RQMRepository();
                break;

            case eALMType.RALLY:
                AlmCore = new RallyCore();
                AlmRepo = new RallyRepository();
                break;

            case eALMType.Jira:
                AlmCore = new JiraCore();
                AlmRepo = new JIRA_Repository(AlmCore);
                break;

            case eALMType.Qtest:
                AlmCore = new QtestCore();
                AlmRepo = new QtestRepository();
                break;

            case eALMType.Octane:
                if (!(AlmCore is OctaneCore && AlmRepo is OctaneRepository))
                {
                    AlmCore = new OctaneCore();
                    AlmRepo = new OctaneRepository(AlmCore);
                }
                break;

            case eALMType.ZephyrEnterprise:
                AlmCore = new ZephyrEntCore();
                AlmRepo = new ZephyrEnt_Repository(AlmCore);
                break;
            }
            AlmCore.GetCurrentAlmConfig(isOperationAlmType);
            ALMCore.SetALMCoreConfigurations(AlmType, AlmCore);
        }