How to use getDescription method of org.cerberus.crud.entity.Robot class

Best Cerberus-source code snippet using org.cerberus.crud.entity.Robot.getDescription

Source:ExecutionStartService.java Github

copy

Full Screen

...105 tCExecution.setStart(executionStart);106 // Checking is the instance allow to open a new execution. It may be in the process to restart.107 if (!executionThreadPoolService.isInstanceActive()) {108 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_INSTANCE_INACTIVE);109 LOG.debug(mes.getDescription());110 throw new CerberusException(mes);111 }112 /**113 * Checking the parameters.114 */115 LOG.debug("Checking the parameters.");116 Invariant myInvariant;117 try {118 myInvariant = invariantService.convert(invariantService.readByKey("OUTPUTFORMAT", tCExecution.getOutputFormat()));119 } catch (CerberusException ex) {120 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_OUTPUTFORMAT_INVALID);121 mes.setDescription(mes.getDescription().replace("%PARAM%", tCExecution.getOutputFormat()));122 LOG.debug(mes.getDescription());123 throw new CerberusException(mes);124 }125 try {126 myInvariant = invariantService.convert(invariantService.readByKey("VERBOSE", String.valueOf(tCExecution.getVerbose())));127 } catch (CerberusException ex) {128 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_VERBOSE_INVALID);129 mes.setDescription(mes.getDescription().replace("%PARAM%", String.valueOf(tCExecution.getVerbose())));130 LOG.debug(mes.getDescription());131 throw new CerberusException(mes);132 }133 try {134 myInvariant = invariantService.convert(invariantService.readByKey("SCREENSHOT", String.valueOf(tCExecution.getScreenshot())));135 } catch (CerberusException ex) {136 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_SCREENSHOT_INVALID);137 mes.setDescription(mes.getDescription().replace("%PARAM%", String.valueOf(tCExecution.getScreenshot())));138 LOG.debug(mes.getDescription());139 throw new CerberusException(mes);140 }141 LOG.debug("Parameters checked.");142 /**143 * Load TestCase information and set TCase to the TestCaseExecution144 * object.145 */146 tCExecution.setResultMessage(new MessageGeneral(MessageGeneralEnum.EXECUTION_PE_LOADINGDATA));147 LOG.debug("Loading Test Case Information. " + tCExecution.getTest() + "-" + tCExecution.getTestCase());148 // Integrate this.loadTestCaseService.loadTestCase(tCExecution); inside with Dependency.149 try {150// TestCase tCase = testCaseService.findTestCaseByKey(tCExecution.getTest(), tCExecution.getTestCase());151 TestCase tCase = testCaseService.convert(testCaseService.readByKey(tCExecution.getTest(), tCExecution.getTestCase()));152 if (tCase != null) {153 tCExecution.setTestCaseObj(tCase);154 tCExecution.setDescription(tCase.getDescription());155 tCExecution.setConditionOperator(tCase.getConditionOperator());156 tCExecution.setConditionVal1(tCase.getConditionVal1());157 tCExecution.setConditionVal1Init(tCase.getConditionVal1());158 tCExecution.setConditionVal2(tCase.getConditionVal2());159 tCExecution.setConditionVal2Init(tCase.getConditionVal2());160 tCExecution.setConditionVal3(tCase.getConditionVal3());161 tCExecution.setConditionVal3Init(tCase.getConditionVal3());162 tCExecution.setTestCaseVersion(tCase.getVersion());163 tCExecution.setTestCasePriority(tCase.getPriority());164 } else {165 throw new CerberusException(new MessageGeneral(MessageGeneralEnum.NO_DATA_FOUND));166 }167 /**168 * Copy the status of the testcase to the status column of the169 * Execution. This is done to know how stable was the testcase at170 * the time of the execution.171 */172 tCExecution.setStatus(tCase.getStatus());173 } catch (CerberusException ex) {174 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_TESTCASE_NOT_FOUND);175 mes.setDescription(mes.getDescription().replace("%TEST%", tCExecution.getTest()));176 mes.setDescription(mes.getDescription().replace("%TESTCASE%", tCExecution.getTestCase()));177 LOG.debug(mes.getDescription());178 throw new CerberusException(mes);179 }180 LOG.debug("Test Case Information Loaded - " + tCExecution.getTest() + "-" + tCExecution.getTestCase());181 /**182 * Load Test information and Set TestObject to the TestCaseExecution183 * object.184 */185 LOG.debug("Loading Test Information");186 try {187 tCExecution.setTestObj(this.testService.convert(this.testService.readByKey(tCExecution.getTest())));188 } catch (CerberusException ex) {189 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_TEST_NOT_FOUND);190 mes.setDescription(mes.getDescription().replace("%TEST%", tCExecution.getTest()));191 LOG.debug(mes.getDescription());192 throw new CerberusException(mes);193 }194 LOG.debug("Test Information Loaded - " + tCExecution.getTest());195 /**196 * Load Application information and Set Application to the197 * TestCaseExecution object.198 */199 LOG.debug("Loading Application Information");200 try {201 tCExecution.setApplication(tCExecution.getTestCaseObj().getApplication());202 tCExecution.setApplicationObj(applicationService.convert(this.applicationService.readByKey(tCExecution.getTestCaseObj().getApplication())));203 // Setting Application Type to value coming from Application.204 tCExecution.setAppTypeEngine(tCExecution.getApplicationObj().getType());205 // Setting System from queue.206 tCExecution.getTestCaseExecutionQueue().setSystem(tCExecution.getApplicationObj().getSystem());207 LOG.debug("Application Information Loaded - " + tCExecution.getApplicationObj().getApplication() + " - " + tCExecution.getApplicationObj().getDescription());208 } catch (CerberusException ex) {209 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_APPLICATION_NOT_FOUND);210 mes.setDescription(mes.getDescription().replace("%APPLI%", tCExecution.getTestCaseObj().getApplication()));211 LOG.debug(mes.getDescription());212 throw new CerberusException(mes);213 }214 /**215 * Init System from Application.216 */217 tCExecution.setSystem(tCExecution.getApplicationObj().getSystem());218 /**219 * Load Country information and Set it to the TestCaseExecution object.220 */221 LOG.debug("Loading Country Information");222 try {223 tCExecution.setCountryObj(invariantService.convert(invariantService.readByKey("COUNTRY", tCExecution.getCountry())));224 if (tCExecution.getCountryObj() != null) {225 LOG.debug("Country Information Loaded - " + tCExecution.getCountryObj().getValue() + " - " + tCExecution.getCountryObj().getDescription());226 } else {227 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_COUNTRY_NOT_FOUND);228 mes.setDescription(mes.getDescription().replace("%COUNTRY%", tCExecution.getCountry()));229 LOG.debug(mes.getDescription());230 throw new CerberusException(mes);231 }232 } catch (CerberusException ex) {233 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_COUNTRY_NOT_FOUND);234 mes.setDescription(mes.getDescription().replace("%COUNTRY%", tCExecution.getCountry()));235 LOG.debug(mes.getDescription());236 throw new CerberusException(mes);237 }238 /**239 * Checking if execution is manual or automaticaly configured. If240 * Manual, CountryEnvironmentParameters object is manually created with241 * the servlet parameters. If automatic, parameters are build from the242 * CountryEnvironmentParameters. table in the database. Environmentdata243 * will always be filled with the environment. Environment will be244 * forced to MANUAL if execution is manual.245 *246 */247 LOG.debug("Checking if connectivity parameters are manual or automatic from the database. '" + tCExecution.isManualURL() + "'");248 if (tCExecution.isManualURL()) {249 LOG.debug("Execution will be done with manual application connectivity setting.");250 if (StringUtil.isNullOrEmpty(tCExecution.getMyHost())) {251 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_MANUALURL_INVALID);252 LOG.debug(mes.getDescription());253 throw new CerberusException(mes);254 } else {255 CountryEnvironmentParameters cea;256 cea = this.factorycountryEnvironmentParameters.create(tCExecution.getApplicationObj().getSystem(), tCExecution.getCountry(), tCExecution.getEnvironment(), tCExecution.getApplicationObj().getApplication(), tCExecution.getMyHost(), "", tCExecution.getMyContextRoot(), tCExecution.getMyLoginRelativeURL(), "", "", "", "", CountryEnvironmentParameters.DEFAULT_POOLSIZE, "", "");257 cea.setIp(tCExecution.getMyHost());258 cea.setUrl(tCExecution.getMyContextRoot());259 String appURL = StringUtil.getURLFromString(cea.getIp(), cea.getUrl(), "", "");260 tCExecution.setUrl(appURL);261 // If domain is empty we guess it from URL.262 if (StringUtil.isNullOrEmpty(cea.getDomain())) {263 cea.setDomain(StringUtil.getDomainFromUrl(appURL));264 }265 cea.setUrlLogin(tCExecution.getMyLoginRelativeURL());266 tCExecution.setCountryEnvironmentParameters(cea);267 LOG.debug(" -> Execution will be done with manual application connectivity setting. IP/URL/LOGIN : " + cea.getIp() + "-" + cea.getUrl() + "-" + cea.getUrlLogin());268 LOG.debug(" Domain : " + cea.getDomain());269 }270 /**271 * If execution is manual, we force the env at 'MANUAL-ENVDATA'272 * string. We keep envData information in order to trace the env273 * data that has been used.274 */275 tCExecution.setEnvironment("MANUAL-" + tCExecution.getEnvironmentData());276 } else {277 /**278 * Automatic application configuration execution.279 */280 LOG.debug("Execution will be done with automatic application connectivity setting.");281 /**282 * Load Country/Environment/Application information and set them to283 * the TestCaseExecution object284 */285 LOG.debug("Loading Country/Environment/Application Information. " + tCExecution.getCountry() + "-" + tCExecution.getEnvironment() + "-" + tCExecution.getApplicationObj().getApplication());286 CountryEnvironmentParameters cea;287 try {288 cea = this.countryEnvironmentParametersService.convert(this.countryEnvironmentParametersService.readByKey(289 tCExecution.getApplicationObj().getSystem(), tCExecution.getCountry(), tCExecution.getEnvironment(), tCExecution.getApplicationObj().getApplication()));290 if (cea != null) {291 tCExecution.setUrl(StringUtil.getURLFromString(cea.getIp(), cea.getUrl(), "", ""));292 // add possibility to override URL with MyHost if MyHost is available293 if (!StringUtil.isNullOrEmpty(tCExecution.getMyHost())) {294 String contextRoot = !StringUtil.isNullOrEmpty(tCExecution.getMyContextRoot()) ? tCExecution.getMyContextRoot() : "";295 tCExecution.setUrl(StringUtil.getURLFromString(tCExecution.getMyHost(), contextRoot, "", ""));296 }297 if (!StringUtil.isNullOrEmpty(tCExecution.getMyLoginRelativeURL())) {298 cea.setUrlLogin(tCExecution.getMyLoginRelativeURL());299 }300 // If domain is empty we guess it from URL.301 if (StringUtil.isNullOrEmpty(cea.getDomain())) {302 cea.setDomain(StringUtil.getDomainFromUrl(tCExecution.getUrl()));303 }304 tCExecution.setCountryEnvironmentParameters(cea);305 } else {306 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_COUNTRYENVAPP_NOT_FOUND);307 mes.setDescription(mes.getDescription().replace("%COUNTRY%", tCExecution.getCountry()));308 mes.setDescription(mes.getDescription().replace("%ENV%", tCExecution.getEnvironment()));309 mes.setDescription(mes.getDescription().replace("%APPLI%", tCExecution.getTestCaseObj().getApplication()));310 LOG.error(mes.getDescription());311 throw new CerberusException(mes);312 }313 /**314 * Forcing the IP URL and Login config from DevIP, DevURL and315 * DevLogin parameter only if DevURL is defined.316 */317 } catch (CerberusException ex) {318 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_COUNTRYENVAPP_NOT_FOUND);319 mes.setDescription(mes.getDescription().replace("%COUNTRY%", tCExecution.getCountry()));320 mes.setDescription(mes.getDescription().replace("%ENV%", tCExecution.getEnvironment()));321 mes.setDescription(mes.getDescription().replace("%APPLI%", tCExecution.getTestCaseObj().getApplication()));322 LOG.error(mes.getDescription(), ex);323 throw new CerberusException(mes);324 }325 LOG.debug("Country/Environment/Application Information Loaded. " + tCExecution.getCountry() + " - " + tCExecution.getEnvironment() + " - " + tCExecution.getApplicationObj().getApplication());326 LOG.debug(" -> Execution will be done with automatic application connectivity setting. IP/URL/LOGIN : " + cea.getIp() + "-" + cea.getUrl() + "-" + cea.getUrlLogin());327 LOG.debug(" Domain : " + cea.getDomain());328 tCExecution.setEnvironmentData(tCExecution.getEnvironment());329 }330 /**331 * Load Environment object from invariant table.332 */333 LOG.debug("Loading Environment Information. " + tCExecution.getEnvironmentData());334 try {335 tCExecution.setEnvironmentDataObj(invariantService.convert(invariantService.readByKey("ENVIRONMENT", tCExecution.getEnvironmentData())));336 } catch (CerberusException ex) {337 if (tCExecution.isManualURL()) {338 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_ENVIRONMENT_DOESNOTEXIST_MAN);339 mes.setDescription(mes.getDescription().replace("%ENV%", tCExecution.getEnvironmentData()));340 LOG.debug(mes.getDescription());341 throw new CerberusException(mes);342 } else {343 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_ENVIRONMENT_DOESNOTEXIST);344 mes.setDescription(mes.getDescription().replace("%ENV%", tCExecution.getEnvironmentData()));345 LOG.debug(mes.getDescription());346 throw new CerberusException(mes);347 }348 }349 LOG.debug("Environment Information Loaded");350 /**351 * Load Country/Environment information and set them to the352 * TestCaseExecution object. Environment considered here is the data353 * environment.354 */355 LOG.debug("Loading Country/Environment Information. " + tCExecution.getCountry() + " - " + tCExecution.getEnvironmentData());356 CountryEnvParam countEnvParam;357 try {358 countEnvParam = this.countryEnvParamService.convert(this.countryEnvParamService.readByKey(tCExecution.getApplicationObj().getSystem(), tCExecution.getCountry(), tCExecution.getEnvironmentData()));359 tCExecution.setCountryEnvParam(countEnvParam);360 /**361 * Copy the Build/Revision of the environment to the Execution. This362 * is done to keep track of all execution done on a specific version363 * of system364 */365 tCExecution.setBuild(countEnvParam.getBuild());366 tCExecution.setRevision(countEnvParam.getRevision());367 } catch (CerberusException ex) {368 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_COUNTRYENV_NOT_FOUND);369 mes.setDescription(mes.getDescription().replace("%SYSTEM%", tCExecution.getApplicationObj().getSystem()));370 mes.setDescription(mes.getDescription().replace("%COUNTRY%", tCExecution.getCountry()));371 mes.setDescription(mes.getDescription().replace("%ENV%", tCExecution.getEnvironmentData()));372 LOG.debug(mes.getDescription());373 throw new CerberusException(mes);374 }375 LOG.debug("Country/Environment Information Loaded. " + tCExecution.getCountry() + " - " + tCExecution.getEnvironmentData());376 // If Robot is feeded, we check it exist. If it exist, we overwrite the associated parameters.377 Robot robObj = null;378 RobotExecutor robExeObj = null;379 String robotHost = "";380 String robotPort = "";381 String browser = tCExecution.getBrowser();382 String robotDecli = "";383 String version = "";384 String platform = "";385 if (!StringUtil.isNullOrEmpty(tCExecution.getRobot())) {386 robObj = robotService.readByKey(tCExecution.getRobot());387 if (robObj == null) {388 throw new CerberusException(new MessageGeneral(MessageGeneralEnum.EXECUTION_FA_ROBOTNOTEXIST)389 .resolveDescription("ROBOT", tCExecution.getRobot()));390 }391 // If Robot parameter is defined and we can find the robot, we overwrite the corresponding parameters.392 browser = ParameterParserUtil.parseStringParam(robObj.getBrowser(), browser);393 robotDecli = ParameterParserUtil.parseStringParam(robObj.getRobotDecli(), "");394 if (StringUtil.isNullOrEmpty(robotDecli)) {395 robotDecli = robObj.getRobot();396 }397 version = ParameterParserUtil.parseStringParam(robObj.getVersion(), version);398 platform = ParameterParserUtil.parseStringParam(robObj.getPlatform(), platform);399 tCExecution.setUserAgent(robObj.getUserAgent());400 tCExecution.setScreenSize(robObj.getScreenSize());401 tCExecution.setBrowser(browser);402 tCExecution.setRobotDecli(robotDecli);403 tCExecution.setVersion(version);404 tCExecution.setPlatform(platform);405 tCExecution.setRobotObj(robObj);406 // We cannot execute a testcase on a desactivated Robot.407 if ("N".equalsIgnoreCase(robObj.getActive())) {408 LOG.debug("Robot " + tCExecution.getRobot() + " is not active.");409 throw new CerberusException(new MessageGeneral(MessageGeneralEnum.EXECUTION_FA_ROBOTNOTACTIVE)410 .resolveDescription("ROBOT", tCExecution.getRobot()));411 }412 // If executor is not set, we get the best one from the list.413 if (StringUtil.isNullOrEmpty(tCExecution.getRobotExecutor())) {414 LOG.debug("Getting the best Executor on Robot : " + tCExecution.getRobot());415 robExeObj = robotExecutorService.readBestByKey(tCExecution.getRobot());416 if (robExeObj != null) {417 tCExecution.setRobotExecutor(robExeObj.getExecutor());418 tCExecution.setRobotExecutorObj(robExeObj);419 robotExecutorService.updateLastExe(robExeObj.getRobot(), robExeObj.getExecutor());420 } else {421 throw new CerberusException(new MessageGeneral(MessageGeneralEnum.EXECUTION_FA_ROBOTBESTEXECUTORNOTEXIST)422 .resolveDescription("ROBOT", tCExecution.getRobot())423 .resolveDescription("EXECUTOR", tCExecution.getRobotExecutor()));424 }425 LOG.debug(" Executor retreived : " + robExeObj.getExecutor());426 } else {427 LOG.debug(" Getting Requested Robot / Executor : " + tCExecution.getRobot() + " / " + tCExecution.getRobotExecutor());428 robExeObj = robotExecutorService.convert(robotExecutorService.readByKey(tCExecution.getRobot(), tCExecution.getRobotExecutor()));429 tCExecution.setRobotExecutorObj(robExeObj);430 if (robExeObj == null) {431 throw new CerberusException(new MessageGeneral(MessageGeneralEnum.EXECUTION_FA_ROBOTEXECUTORNOTEXIST)432 .resolveDescription("ROBOT", tCExecution.getRobot())433 .resolveDescription("EXECUTOR", tCExecution.getRobotExecutor()));434 } else {435 // We cannot execute a testcase on a desactivated Robot.436 if ("N".equalsIgnoreCase(robExeObj.getActive())) {437 LOG.debug("Robot Executor " + tCExecution.getRobot() + " / " + tCExecution.getRobotExecutor() + " is not active.");438 throw new CerberusException(new MessageGeneral(MessageGeneralEnum.EXECUTION_FA_ROBOTEXECUTORNOTACTIVE)439 .resolveDescription("ROBOT", tCExecution.getRobot())440 .resolveDescription("EXECUTOR", tCExecution.getRobotExecutor()));441 }442 }443 }444 robotHost = ParameterParserUtil.parseStringParam(robExeObj.getHost(), tCExecution.getRobotHost());445 robotPort = ParameterParserUtil.parseStringParam(String.valueOf(robExeObj.getPort()), tCExecution.getRobotPort());446 tCExecution.setRobotHost(robotHost);447 tCExecution.setRobotPort(robotPort);448 tCExecution.setSeleniumIP(robotHost);449 tCExecution.setSeleniumPort(robotPort);450 tCExecution.setSeleniumIPUser(robExeObj.getHostUser());451 tCExecution.setSeleniumIPPassword(robExeObj.getHostPassword());452 } else {453 tCExecution.setRobotDecli(browser);454 }455 /**456 * If Timeout is defined at the execution level, set action wait default457 * to this value, else Get the cerberus_action_wait_default parameter.458 * This parameter will be used by tha wait action if no timeout/event is459 * defined.460 */461 try {462 if (!tCExecution.getTimeout().isEmpty()) {463 tCExecution.setCerberus_action_wait_default(Integer.valueOf(tCExecution.getTimeout()));464 } else {465 tCExecution.setCerberus_action_wait_default(parameterService.getParameterIntegerByKey("cerberus_action_wait_default", tCExecution.getApplicationObj().getSystem(), 90000));466 }467 } catch (NumberFormatException ex) {468 LOG.warn("Parameter cerberus_action_wait_default must be an integer, default value set to 90000 milliseconds. " + ex.toString());469 tCExecution.setCerberus_action_wait_default(90000);470 }471 /**472 * Check if test can be executed TODO : Replace Message with try/catch473 * cerberus exception474 */475 tCExecution.setResultMessage(new MessageGeneral(MessageGeneralEnum.EXECUTION_PE_VALIDATIONSTARTING));476 LOG.debug("Performing the Checks before starting the execution");477 MessageGeneral canExecuteTestCase = this.executionCheckService.checkTestCaseExecution(tCExecution);478 tCExecution.setResultMessage(canExecuteTestCase);479 /**480 * We stop if the result is not OK481 */482 if (!(tCExecution.getResultMessage().equals(new MessageGeneral(MessageGeneralEnum.EXECUTION_PE_CHECKINGPARAMETERS)))) {483 return tCExecution;484 }485 LOG.debug("Checks performed -- > OK to continue.");486 /**487 * Changing Automatic execution flag depending on test case information.488 */489 if (tCExecution.getManualExecution().equals(TestCaseExecution.MANUAL_A)) {490 if (tCExecution.getTestCaseObj().getType().equals(TestCase.TESTCASE_TYPE_AUTOMATED)491 || tCExecution.getTestCaseObj().getType().equals(TestCase.TESTCASE_TYPE_PRIVATE)) {492 tCExecution.setManualExecution(TestCaseExecution.MANUAL_N);493 } else {494 tCExecution.setManualExecution(TestCaseExecution.MANUAL_Y);495 }496 }497 /**498 * For GUI application, check if Browser is supported.499 */500 if (!tCExecution.getManualExecution().equals("Y") && tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_GUI)) {501 try {502 myInvariant = invariantService.convert(invariantService.readByKey("BROWSER", tCExecution.getBrowser()));503 } catch (CerberusException ex) {504 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_BROWSER_NOT_SUPPORTED);505 mes.setDescription(mes.getDescription().replace("%BROWSER%", tCExecution.getBrowser()));506 LOG.debug(mes.getDescription());507 throw new CerberusException(mes);508 }509 }510 /**511 * Register RunID inside database.512 */513 tCExecution.setResultMessage(new MessageGeneral(MessageGeneralEnum.EXECUTION_PE_CREATINGRUNID));514 LOG.debug("Registering Execution ID on database");515 long runID = 0;516 try {517 runID = this.testCaseExecutionService.registerRunID(tCExecution);518 if (runID != 0) {519 tCExecution.setId(runID);520 executionUUIDObject.setExecutionUUID(tCExecution.getExecutionUUID(), tCExecution);521 // Update Queue Execution here if QueueID =! 0.522 if (tCExecution.getQueueID() != 0) {523 inQueueService.updateToExecuting(tCExecution.getQueueID(), "", runID);524 }525 } else {526 MessageGeneral mes = new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_COULDNOTCREATE_RUNID);527 tCExecution.setResultMessage(mes);528 LOG.fatal("Could not create RunID, or cannot retreive the generated Key");529 throw new CerberusException(mes);530 }531 } catch (CerberusException ex) {532 tCExecution.setResultMessage(new MessageGeneral(MessageGeneralEnum.VALIDATION_FAILED_COULDNOTCREATE_RUNID));533 LOG.warn(ex.getMessageError().getDescription(), ex);534 throw new CerberusException(ex.getMessageError(), ex);535 }536 LOG.debug("Execution ID registered on database : " + tCExecution.getId());537 /**538 * Stop the browser if executionID is equal to zero (to prevent database539 * instabilities)540 */541 if (tCExecution.getManualExecution().equals(TestCaseExecution.MANUAL_Y)) {542 // Set execution executor from testcase executor (only for manual execution).543 tCExecution.setExecutor(tCExecution.getTestCaseObj().getExecutor());544// try {545// if (tCExecution.getId() == 0) {546// LOG.debug("Starting to Stop the Selenium Server.");547// this.serverService.stopServer(tCExecution);...

Full Screen

Full Screen

getDescription

Using AI Code Generation

copy

Full Screen

1function getDescription(robotId) {2 var robot = robotService.findRobotByKey(robotId);3 if (robot != null) {4 return robot.getDescription();5 } else {6 throw new CerberusException("Robot id " + robotId + " does not exist");7 }8}9function getDescription(robotId) {10 var robot = robotService.findRobotByKey(robotId);11 if (robot != null) {12 return robot.getDescription();13 } else {14 throw new CerberusException("Robot id " + robotId + " does not exist");15 }16}17function getDescription(robotId) {18 var robot = robotService.findRobotByKey(robotId);19 if (robot != null) {20 return robot.getDescription();21 } else {22 throw new CerberusException("Robot id " + robotId + " does not exist");23 }24}

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful