public override Dictionary <string, string> GetTaskProperties() { LauncherParamsBuilder builder = new LauncherParamsBuilder(); builder.SetRunType(RunType.FileSystem); builder.SetPerScenarioTimeOut(Timeout); var tests = TestsPath.Split("\n".ToArray()); for (int i = 0; i < tests.Length; i++) { string pathToTest = tests[i].Replace("\\", "\\\\"); builder.SetTest(i + 1, pathToTest); } builder.SetUploadArtifact(UploadArtifact); builder.SetArtifactType(ArtType); builder.SetReportName(ReportFileName); builder.SetArchiveName(ArchiveName); builder.SetStorageAccount(StorageAccount); builder.SetContainer(Container); builder.SetBuildNumber(BuildNumber); return(builder.GetProperties()); }
public override Dictionary <string, string> GetTaskProperties() { LauncherParamsBuilder builder = new LauncherParamsBuilder(); builder.SetRunType(RunType.AlmLabManagement); builder.SetAlmServerUrl(ALMServerPath); builder.SetAlmUserName(ALMUserName); builder.SetAlmPassword(ALMPassword); builder.SetAlmDomain(ALMDomain); builder.SetAlmProject(ALMProject); builder.SetBuildNumber(BuildNumber); switch (TestRunType) { case "testSet": builder.SetTestRunType(RunTestType.TEST_SUITE); break; case "buildVerificationSuite": builder.SetTestRunType(RunTestType.BUILD_VERIFICATION_SUITE); break; } if (!string.IsNullOrEmpty(ALMTestSet)) { int i = 1; foreach (string testSet in ALMTestSet.Split('\n')) { builder.SetTestSet(i++, testSet.Replace(@"\", @"\\")); } } else { builder.SetAlmTestSet(""); } if (UseCDA) { builder.SetDeploymentAction(DeploymentAction); builder.SetDeployedEnvironmentName(DeploymentEnvironmentName); builder.SetDeprovisioningAction(DeprovisioningAction); } //set ALM mandatory parameters builder.SetAlmTimeout(TimeslotDuration); builder.SetAlmRunMode(AlmRunMode.RUN_LOCAL); builder.SetAlmRunHost("localhost"); /*builder.SetUploadArtifact(UploadArtifact); * builder.SetArtifactType(ArtType); * builder.SetReportName(ReportFileName); * builder.SetArchiveName(ArchiveName); * builder.SetStorageAccount(StorageAccount); * builder.SetContainer(Container);*/ return(builder.GetProperties()); }
public override Dictionary <string, string> GetTaskProperties() { LauncherParamsBuilder builder = new LauncherParamsBuilder(); builder.SetRunType(RunType.Alm); builder.SetAlmServerUrl(ALMServerPath); builder.SetSSOEnabled(SSOEnabled); builder.SetClientID(ClientID); builder.SetApiKeySecret(ApiKeySecret); builder.SetAlmUserName(ALMUserName); builder.SetAlmPassword(ALMPassword); builder.SetAlmDomain(ALMDomain); builder.SetAlmProject(ALMProject); builder.SetAlmRunHost(ALMRunHost); builder.SetAlmTimeout(TimeOut); builder.SetBuildNumber(BuildNumber); switch (RunMode) { case "runLocally": builder.SetAlmRunMode(AlmRunMode.RUN_LOCAL); break; case "runOnPlannedHost": builder.SetAlmRunMode(AlmRunMode.RUN_PLANNED_HOST); break; case "runRemotely": builder.SetAlmRunMode(AlmRunMode.RUN_REMOTE); break; } if (!string.IsNullOrEmpty(ALMTestSet)) { int i = 1; foreach (string testSet in ALMTestSet.Split('\n')) { builder.SetTestSet(i++, testSet.Replace(@"\", @"\\")); } } else { builder.SetAlmTestSet(""); } /* builder.SetUploadArtifact(UploadArtifact); * builder.SetArtifactType(ArtType); * builder.SetReportName(ReportFileName); * builder.SetArchiveName(ArchiveName); * builder.SetStorageAccount(StorageAccount); * builder.SetContainer(Container);*/ return(builder.GetProperties()); }
public override Dictionary <string, string> GetTaskProperties() { LauncherParamsBuilder builder = new LauncherParamsBuilder(); builder.SetRunType(RunType.FileSystem); builder.SetPerScenarioTimeOut(Timeout); var tests = TestsPath.Split("\n".ToArray()); for (int i = 0; i < tests.Length; i++) { string pathToTest = tests[i].Replace("\\", "\\\\"); builder.SetTest(i + 1, pathToTest); } builder.SetUploadArtifact(UploadArtifact); builder.SetArtifactType(ArtType); builder.SetReportName(ReportFileName); builder.SetArchiveName(ArchiveName); builder.SetStorageAccount(StorageAccount); builder.SetContainer(Container); builder.SetBuildNumber(BuildNumber); builder.SetEnableFailedTestsReport(EnableFailedTestsReport); builder.SetUseParallelRunner(UseParallelRunner); if (UseParallelRunner) { builder.SetParallelRunnerEnvType(ParallelRunnerConfig.EnvType); if (ParallelRunnerConfig.EnvType == MOBILE) { var devices = ParallelRunnerConfig.Devices; if (devices.Any()) { for (int i = 0; i < tests.Length; i++) { for (int j = 0; j < devices.Count; j++) { builder.SetParallelTestEnv(i + 1, j + 1, devices[j].ToRawString()); } } } } else if (ParallelRunnerConfig.EnvType == WEB) { //TOOO } } return(builder.GetProperties()); }
public override Dictionary <string, string> GetTaskProperties() { LauncherParamsBuilder builder = new LauncherParamsBuilder(); builder.SetRunType(RunType.FileSystem); builder.SetPerScenarioTimeOut(Timeout); var tests = TestsPath.Split(";".ToArray()); for (int i = 0; i < tests.Length; i++) { string pathToTest = tests[i].Replace("\\", "\\\\"); builder.SetTest(i + 1, pathToTest); } return(builder.GetProperties()); }
public override Dictionary <string, string> GetTaskProperties() { LauncherParamsBuilder builder = new LauncherParamsBuilder(); builder.SetRunType(RunType.AlmLabManagement); builder.SetAlmServerUrl(ALMServerPath); builder.SetSSOEnabled(IsSSO); builder.SetClientID(ClientID); builder.SetApiKeySecret(ApiKeySecret); builder.SetAlmUserName(ALMUserName); builder.SetAlmPassword(ALMPassword); builder.SetAlmDomain(ALMDomain); builder.SetAlmProject(ALMProject); builder.SetBuildNumber(BuildNumber); switch (TestRunType) { case C.TEST_SET: builder.SetTestRunType(RunTestType.TEST_SUITE); break; case C.BVS: builder.SetTestRunType(RunTestType.BUILD_VERIFICATION_SUITE); break; } if (!string.IsNullOrEmpty(ALMEntityId)) { int i = 1; foreach (string testSet in ALMEntityId.Split(C.LINE_FEED)) { builder.SetTestSet(i++, testSet.Replace(@"\", @"\\")); } } else { builder.SetAlmTestSet(string.Empty); } //set ALM mandatory parameters builder.SetAlmTimeout(TimeslotDuration); builder.SetAlmRunMode(AlmRunMode.RUN_PLANNED_HOST); builder.SetAlmRunHost(string.Empty); return(builder.GetProperties()); }
public override Dictionary <string, string> GetTaskProperties() { LauncherParamsBuilder builder = new LauncherParamsBuilder(); builder.SetRunType(RunType.Alm); builder.SetAlmServerUrl(ALMServerPath); builder.SetAlmUserName(ALMUserName); builder.SetAlmPassword(ALMPassword); builder.SetAlmDomain(ALMDomain); builder.SetAlmProject(ALMProject); builder.SetAlmRunHost(ALMRunHost); builder.SetAlmTimeout(TimeOut); switch (RunMode) { case "runLocally": builder.SetAlmRunMode(AlmRunMode.RUN_LOCAL); break; case "runOnPlannedHost": builder.SetAlmRunMode(AlmRunMode.RUN_PLANNED_HOST); break; case "runRemotely": builder.SetAlmRunMode(AlmRunMode.RUN_REMOTE); break; } if (!string.IsNullOrEmpty(ALMTestSet)) { int i = 1; foreach (string testSet in ALMTestSet.Split('\n')) { builder.SetTestSet(i++, testSet.Replace(@"\", @"\\")); } } else { builder.SetAlmTestSet(""); } return(builder.GetProperties()); }
public override Dictionary <string, string> GetTaskProperties() { LauncherParamsBuilder builder = new LauncherParamsBuilder(); builder.SetRunType(RunType.FileSystem); builder.SetPerScenarioTimeOut(Timeout); /* * boolean useMC = BooleanUtils.toBoolean(map.get(RunFromFileSystemTaskConfigurator.USE_MC_SETTINGS)); * if (useMC) * { * String mcServerUrl = map.get(RunFromFileSystemTaskConfigurator.MCSERVERURL); * String mcUserName = map.get(RunFromFileSystemTaskConfigurator.MCUSERNAME); * String mcPassword = map.get(RunFromFileSystemTaskConfigurator.MCPASSWORD); * String proxyAddress = null; * String proxyUserName = null; * String proxyPassword = null; * * boolean useSSL = BooleanUtils.toBoolean(map.get(RunFromFileSystemTaskConfigurator.USE_SSL)); * builder.setMobileUseSSL(useSSL ? 1 : 0); * * if (useSSL) * { * buildLogger.addBuildLogEntry("********** Use SSL ********** "); * } * * boolean useProxy = BooleanUtils.toBoolean(map.get(RunFromFileSystemTaskConfigurator.USE_PROXY)); * * builder.setMobileUseProxy(useProxy ? 1 : 0); * * if (useProxy) * { * * buildLogger.addBuildLogEntry("********** Use Proxy ********** "); * * builder.setMobileProxyType(2); * * proxyAddress = map.get(RunFromFileSystemTaskConfigurator.PROXY_ADDRESS); * * //proxy info * if (proxyAddress != null) * { * * builder.setMobileProxySetting_Address(proxyAddress); * * } * * Boolean specifyAuthentication = BooleanUtils.toBoolean(RunFromFileSystemTaskConfigurator.SPECIFY_AUTHENTICATION); * * builder.setMobileProxySetting_Authentication(specifyAuthentication ? 1 : 0); * * if (specifyAuthentication) * { * proxyUserName = map.get(RunFromFileSystemTaskConfigurator.PROXY_USERNAME); * proxyPassword = map.get(RunFromFileSystemTaskConfigurator.PROXY_PASSWORD); * * if (proxyUserName != null && proxyPassword != null) * { * builder.setMobileProxySetting_UserName(proxyUserName); * builder.setMobileProxySetting_Password(proxyPassword); * } * * } * } * else * { * builder.setMobileProxyType(0); * } * * * if (!mcInfoCheck(mcServerUrl, mcUserName, mcPassword)) * { * //url name password * builder.setServerUrl(mcServerUrl); * builder.setUserName(mcUserName); * builder.setFileSystemPassword(mcPassword); * * String jobUUID = map.get(RunFromFileSystemTaskConfigurator.JOB_UUID); * * //write the specified job info(json type) to properties * JobOperation operation = new JobOperation(mcServerUrl, mcUserName, mcPassword, proxyAddress, proxyUserName, proxyPassword); * * String mobileInfo = null; * JSONObject jobJSON = null; * JSONObject dataJSON = null; * JSONArray extArr = null; * JSONObject applicationJSONObject = null; * * if (jobUUID != null) * { * * try * { * jobJSON = operation.getJobById(jobUUID); * } * catch (HttpConnectionException e) * { * buildLogger.addErrorLogEntry("********** Fail to connect mobile center, please check URL, UserName, Password, and Proxy Configuration ********** "); * } * * if (jobJSON != null) * { * dataJSON = (JSONObject)jobJSON.get("data"); * if (dataJSON != null) * { * * applicationJSONObject = (JSONObject)dataJSON.get("application"); * if (applicationJSONObject != null) * { * applicationJSONObject.remove(ICON); * } * * extArr = (JSONArray)dataJSON.get("extraApps"); * if (extArr != null) * { * Iterator<Object> iterator = extArr.iterator(); * * while (iterator.hasNext()) * { * JSONObject extAppJSONObject = (JSONObject)iterator.next(); * extAppJSONObject.remove(ICON); * } * * } * } * * mobileInfo = dataJSON.toJSONString(); * builder.setMobileInfo(mobileInfo); * } * } * * } * * * } */ var tests = TestsPath.Split("\n".ToArray()); for (int i = 0; i < tests.Length; i++) { string pathToTest = tests[i].Replace("\\", "\\\\"); builder.SetTest(i + 1, pathToTest); } return(builder.GetProperties()); }