How to use getTestcaseExecutionQueueDepList method of org.cerberus.crud.entity.TestCaseExecutionQueue class

Best Cerberus-source code snippet using org.cerberus.crud.entity.TestCaseExecutionQueue.getTestcaseExecutionQueueDepList

Source:TestCaseExecution.java Github

copy

Full Screen

1/**2 * Cerberus Copyright (C) 2013 - 2017 cerberustesting3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4 *5 * This file is part of Cerberus.6 *7 * Cerberus is free software: you can redistribute it and/or modify8 * it under the terms of the GNU General Public License as published by9 * the Free Software Foundation, either version 3 of the License, or10 * (at your option) any later version.11 *12 * Cerberus is distributed in the hope that it will be useful,13 * but WITHOUT ANY WARRANTY; without even the implied warranty of14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15 * GNU General Public License for more details.16 *17 * You should have received a copy of the GNU General Public License18 * along with Cerberus. If not, see <http://www.gnu.org/licenses/>.19 */20package org.cerberus.crud.entity;21import java.sql.Timestamp;22import java.util.HashMap;23import java.util.List;24import java.util.TreeMap;25import java.util.Map;26import org.apache.kafka.common.TopicPartition;27import org.apache.logging.log4j.LogManager;28import org.apache.logging.log4j.Logger;29import org.cerberus.engine.entity.MessageGeneral;30import org.cerberus.engine.entity.Selenium;31import org.cerberus.engine.entity.Session;32import org.json.JSONArray;33import org.json.JSONException;34import org.json.JSONObject;35/**36 * @author bcivel37 */38public class TestCaseExecution {39 private static final Logger LOG = LogManager.getLogger(TestCaseExecution.class);40 private long id;41 private String system;42 private String test;43 private String testCase;44 private String description;45 private String build;46 private String revision;47 private String environment;48 private String environmentData;49 private String country;50 private String robot;51 private String robotExecutor;52 private String robotHost; // Host the Selenium IP53 private String robotPort; // host the Selenium Port54 private String robotDecli;55 private String robotProvider;56 private String robotSessionID;57 private String browser;58 private String version;59 private String platform;60 private long start;61 private long end;62 private String controlStatus;63 private String controlMessage;64 private String application;65 private String url;66 private String tag;67 private String status;68 private String crbVersion;69 private String executor;70 private String screenSize;71 private String conditionOper;72 private String conditionVal1Init;73 private String conditionVal2Init;74 private String conditionVal3Init;75 private String conditionVal1;76 private String conditionVal2;77 private String conditionVal3;78 private String manualExecution;79 private String userAgent;80 private long queueID;81 private String UsrCreated;82 private Timestamp DateCreated;83 private String UsrModif;84 private Timestamp DateModif;85 private int testCaseVersion;86 private int testCasePriority;87 /**88 * From here are data outside database model.89 */90 // Execution Parameters91 private String queueState;92 private int verbose;93 private int screenshot;94 private String outputFormat;95 private boolean manualURL;96 private String myHost;97 private String myContextRoot;98 private String myLoginRelativeURL;99 private String seleniumIP;100 private String seleniumIPUser;101 private String seleniumIPPassword;102 private String seleniumPort;103 private Integer pageSource;104 private Integer seleniumLog;105 private Integer numberOfRetries;106 private boolean synchroneous;107 private String timeout;108 // Objects.109 private TestCaseExecutionQueue testCaseExecutionQueue;110 private Application applicationObj;111 private Invariant CountryObj;112 private Test testObj;113 private TestCase testCaseObj;114 private Tag tagObj;115 private CountryEnvParam countryEnvParam;116 private CountryEnvironmentParameters countryEnvironmentParameters;117 private Invariant environmentDataObj;118 // Host the list of the files stored at execution level119 private List<TestCaseExecutionFile> fileList;120 // Host the list of Steps that will be executed (both pre tests and main test)121 private List<TestCaseStepExecution> testCaseStepExecutionList;122 // Host the full list of data calculated during the execution.123 private TreeMap<String, TestCaseExecutionData> testCaseExecutionDataMap;124 // This is used to keep track of all property calculated within a step/action/control. It is reset each time we enter a step/action/control and the property name is added to the list each time it gets calculated. In case it was already asked for calculation, we stop the execution with FA message.125 private List<String> recursiveAlreadyCalculatedPropertiesList;126 private List<TestCaseCountryProperties> testCaseCountryPropertyList;127 private List<TestCaseExecutionQueueDep> testCaseExecutionQueueDepList;128 private List<String> videos;129 // Used in reporting page to report the previous executions from the same tag.130 private long previousExeId;131 private String previousExeStatus;132 // Others133 private MessageGeneral resultMessage;134 private String executionUUID;135 private Selenium selenium;136 private Session session;137 private Robot robotObj;138 private RobotExecutor robotExecutorObj;139 private AppService lastServiceCalled;140 private Integer nbExecutions; // Has the nb of execution that was necessary to execute the testcase.141 // Global parameters.142 private Integer cerberus_action_wait_default;143 private boolean cerberus_featureflipping_activatewebsocketpush;144 private long cerberus_featureflipping_websocketpushperiod;145 private long lastWebsocketPush;146 // Remote Proxy data.147 private boolean remoteProxyStarted;148 private Integer remoteProxyPort;149 private String remoteProxyUUID;150 private String remoteProxyLastHarMD5;151 // Kafka Consumers152 private HashMap<String, Map<TopicPartition, Long>> kafkaLatestOffset;153 /**154 * Invariant PROPERTY TYPE String.155 */156 public static final String CONTROLSTATUS_OK = "OK"; // Test executed and everything was fine.157 public static final String CONTROLSTATUS_OK_COL = "#5CB85C"; // Test executed and everything was fine.158 public static final String CONTROLSTATUS_KO = "KO"; // Test executed and 1 control has reported a bug. --> Ticket to be open for dev team.159 public static final String CONTROLSTATUS_KO_COL = "#D9534F"; // Test executed and 1 control has reported a bug. --> Ticket to be open for dev team.160 public static final String CONTROLSTATUS_FA = "FA"; // Test failed to be executed. --> Problem is in the test itself.161 public static final String CONTROLSTATUS_FA_COL = "#F0AD4E"; // Test failed to be executed. --> Problem is in the test itself.162 public static final String CONTROLSTATUS_NA = "NA"; // Test could not be executed because no data could be retreive for testing.163 public static final String CONTROLSTATUS_NA_COL = "#F1C40F"; // Test could not be executed because no data could be retreive for testing.164 public static final String CONTROLSTATUS_NE = "NE"; // Test was not executed.165 public static final String CONTROLSTATUS_NE_COL = "#aaa"; // Test was not executed.166 public static final String CONTROLSTATUS_WE = "WE"; // Test is waiting for a manual testing.167 public static final String CONTROLSTATUS_WE_COL = "#34495E"; // Test is waiting for a manual testing.168 public static final String CONTROLSTATUS_PE = "PE"; // Test is currently beeing executed.169 public static final String CONTROLSTATUS_PE_COL = "#3498DB"; // Test is currently beeing executed.170 public static final String CONTROLSTATUS_CA = "CA"; // Test has been cancelled by user.171 public static final String CONTROLSTATUS_CA_COL = "#F0AD4E"; // Test has been cancelled by user.172 public static final String CONTROLSTATUS_QU = "QU"; // Test is still waiting in queue.173 public static final String CONTROLSTATUS_QU_COL = "#BF00BF"; // Test is still waiting in queue.174 public static final String CONTROLSTATUS_QE = "QE"; // Test is stuck in Queue.175 public static final String CONTROLSTATUS_QE_COL = "#5C025C"; // Test is stuck in Queue.176 public static final String MANUAL_Y = "Y";177 public static final String MANUAL_N = "N";178 public static final String MANUAL_A = "A";179 public static final String ROBOTPROVIDER_BROWSERSTACK = "BROWSERSTACK";180 public static final String ROBOTPROVIDER_KOBITON = "KOBITON";181 public static final String ROBOTPROVIDER_NONE = "NONE";182 public HashMap<String, Map<TopicPartition, Long>> getKafkaLatestOffset() {183 return kafkaLatestOffset;184 }185 public void setKafkaLatestOffset(HashMap<String, Map<TopicPartition, Long>> kafkaLatestOffset) {186 this.kafkaLatestOffset = kafkaLatestOffset;187 }188 public boolean isRemoteProxyStarted() {189 return remoteProxyStarted;190 }191 public void setRemoteProxyStarted(boolean remoteProxyStarted) {192 this.remoteProxyStarted = remoteProxyStarted;193 }194 public String getRobotSessionID() {195 return robotSessionID;196 }197 public void setRobotSessionID(String robotSessionID) {198 this.robotSessionID = robotSessionID;199 }200 public String getRobotProvider() {201 return robotProvider;202 }203 public void setRobotProvider(String robotProvider) {204 this.robotProvider = robotProvider;205 }206 public long getPreviousExeId() {207 return previousExeId;208 }209 public void setPreviousExeId(long previousExeId) {210 this.previousExeId = previousExeId;211 }212 public String getPreviousExeStatus() {213 return previousExeStatus;214 }215 public void setPreviousExeStatus(String previousExeStatus) {216 this.previousExeStatus = previousExeStatus;217 }218 public RobotExecutor getRobotExecutorObj() {219 return robotExecutorObj;220 }221 public void setRobotExecutorObj(RobotExecutor robotExecutorObj) {222 this.robotExecutorObj = robotExecutorObj;223 }224 public Robot getRobotObj() {225 return robotObj;226 }227 public void setRobotObj(Robot robotObj) {228 this.robotObj = robotObj;229 }230 public String getSystem() {231 return system;232 }233 public void setSystem(String system) {234 this.system = system;235 }236 public String getRobotDecli() {237 return robotDecli;238 }239 public void setRobotDecli(String robotDecli) {240 this.robotDecli = robotDecli;241 }242 public Integer getNbExecutions() {243 return nbExecutions;244 }245 public void setNbExecutions(Integer nbExecutions) {246 this.nbExecutions = nbExecutions;247 }248 public String getQueueState() {249 return queueState;250 }251 public void setQueueState(String queueState) {252 this.queueState = queueState;253 }254 public TestCaseExecutionQueue getTestCaseExecutionQueue() {255 return testCaseExecutionQueue;256 }257 public void setTestCaseExecutionQueue(TestCaseExecutionQueue testCaseExecutionQueue) {258 this.testCaseExecutionQueue = testCaseExecutionQueue;259 }260 public String getUsrCreated() {261 return UsrCreated;262 }263 public void setUsrCreated(String UsrCreated) {264 this.UsrCreated = UsrCreated;265 }266 public Timestamp getDateCreated() {267 return DateCreated;268 }269 public void setDateCreated(Timestamp DateCreated) {270 this.DateCreated = DateCreated;271 }272 public String getUsrModif() {273 return UsrModif;274 }275 public void setUsrModif(String UsrModif) {276 this.UsrModif = UsrModif;277 }278 public Timestamp getDateModif() {279 return DateModif;280 }281 public void setDateModif(Timestamp DateModif) {282 this.DateModif = DateModif;283 }284 public long getQueueID() {285 return queueID;286 }287 public void setQueueID(long queueID) {288 this.queueID = queueID;289 }290 public String getDescription() {291 return description;292 }293 public void setDescription(String description) {294 this.description = description;295 }296 public List<String> getRecursiveAlreadyCalculatedPropertiesList() {297 return recursiveAlreadyCalculatedPropertiesList;298 }299 public void setRecursiveAlreadyCalculatedPropertiesList(List<String> recursiveAlreadyCalculatedPropertiesList) {300 this.recursiveAlreadyCalculatedPropertiesList = recursiveAlreadyCalculatedPropertiesList;301 }302 public TreeMap<String, TestCaseExecutionData> getTestCaseExecutionDataMap() {303 return testCaseExecutionDataMap;304 }305 public void setTestCaseExecutionDataMap(TreeMap<String, TestCaseExecutionData> testCaseExecutionDataMap) {306 this.testCaseExecutionDataMap = testCaseExecutionDataMap;307 }308 public AppService getLastServiceCalled() {309 return lastServiceCalled;310 }311 public void setLastServiceCalled(AppService lastServiceCalled) {312 this.lastServiceCalled = lastServiceCalled;313 }314 public long getLastWebsocketPush() {315 return lastWebsocketPush;316 }317 public void setLastWebsocketPush(long lastWebsocketPush) {318 this.lastWebsocketPush = lastWebsocketPush;319 }320 public String getConditionOper() {321 return conditionOper;322 }323 public void setConditionOper(String conditionOper) {324 this.conditionOper = conditionOper;325 }326 public String getConditionVal1Init() {327 return conditionVal1Init;328 }329 public void setConditionVal1Init(String conditionVal1Init) {330 this.conditionVal1Init = conditionVal1Init;331 }332 public String getConditionVal2Init() {333 return conditionVal2Init;334 }335 public void setConditionVal2Init(String conditionVal2Init) {336 this.conditionVal2Init = conditionVal2Init;337 }338 public String getConditionVal3Init() {339 return conditionVal3Init;340 }341 public void setConditionVal3Init(String conditionVal3Init) {342 this.conditionVal3Init = conditionVal3Init;343 }344 public String getConditionVal1() {345 return conditionVal1;346 }347 public void setConditionVal1(String conditionVal1) {348 this.conditionVal1 = conditionVal1;349 }350 public String getConditionVal2() {351 return conditionVal2;352 }353 public void setConditionVal2(String conditionVal2) {354 this.conditionVal2 = conditionVal2;355 }356 public String getConditionVal3() {357 return conditionVal3;358 }359 public void setConditionVal3(String conditionVal3) {360 this.conditionVal3 = conditionVal3;361 }362 public long getCerberus_featureflipping_websocketpushperiod() {363 return cerberus_featureflipping_websocketpushperiod;364 }365 public void setCerberus_featureflipping_websocketpushperiod(long cerberus_featureflipping_websocketpushperiod) {366 this.cerberus_featureflipping_websocketpushperiod = cerberus_featureflipping_websocketpushperiod;367 }368 public boolean isCerberus_featureflipping_activatewebsocketpush() {369 return cerberus_featureflipping_activatewebsocketpush;370 }371 public void setCerberus_featureflipping_activatewebsocketpush(boolean cerberus_featureflipping_activatewebsocketpush) {372 this.cerberus_featureflipping_activatewebsocketpush = cerberus_featureflipping_activatewebsocketpush;373 }374 public Integer getCerberus_action_wait_default() {375 return cerberus_action_wait_default;376 }377 public void setCerberus_action_wait_default(Integer cerberus_action_wait_default) {378 this.cerberus_action_wait_default = cerberus_action_wait_default;379 }380 public String getApplication() {381 return application;382 }383 public void setApplication(String application) {384 this.application = application;385 }386 public String getUserAgent() {387 return userAgent;388 }389 public void setUserAgent(String userAgent) {390 this.userAgent = userAgent;391 }392 public Integer getNumberOfRetries() {393 return numberOfRetries;394 }395 public void setNumberOfRetries(Integer numberOfRetries) {396 this.numberOfRetries = numberOfRetries;397 }398 public void decreaseNumberOfRetries() {399 this.numberOfRetries--;400 }401 public List<TestCaseCountryProperties> getTestCaseCountryPropertyList() {402 return testCaseCountryPropertyList;403 }404 public void setTestCaseCountryPropertyList(List<TestCaseCountryProperties> testCaseCountryPropertyList) {405 this.testCaseCountryPropertyList = testCaseCountryPropertyList;406 }407 public String getManualExecution() {408 return manualExecution;409 }410 public void setManualExecution(String manualExecution) {411 this.manualExecution = manualExecution;412 }413 public Session getSession() {414 return session;415 }416 public void setSession(Session session) {417 this.session = session;418 }419 public Integer getPageSource() {420 return pageSource;421 }422 public void setPageSource(Integer pageSource) {423 this.pageSource = pageSource;424 }425 public Integer getSeleniumLog() {426 return seleniumLog;427 }428 public void setSeleniumLog(Integer seleniumLog) {429 this.seleniumLog = seleniumLog;430 }431 public boolean isSynchroneous() {432 return synchroneous;433 }434 public void setSynchroneous(boolean synchroneous) {435 this.synchroneous = synchroneous;436 }437 public String getTimeout() {438 return timeout;439 }440 public void setTimeout(String timeout) {441 this.timeout = timeout;442 }443 public String getExecutionUUID() {444 return executionUUID;445 }446 public void setExecutionUUID(String executionUUID) {447 this.executionUUID = executionUUID;448 }449 public Selenium getSelenium() {450 return selenium;451 }452 public void setSelenium(Selenium selenium) {453 this.selenium = selenium;454 }455 public String getVersion() {456 return version;457 }458 public void setVersion(String version) {459 this.version = version;460 }461 public String getPlatform() {462 return platform;463 }464 public void setPlatform(String platform) {465 this.platform = platform;466 }467 public Invariant getCountryObj() {468 return CountryObj;469 }470 public void setCountryObj(Invariant CountryObj) {471 this.CountryObj = CountryObj;472 }473 public Invariant getEnvironmentDataObj() {474 return environmentDataObj;475 }476 public void setEnvironmentDataObj(Invariant environmentDataObj) {477 this.environmentDataObj = environmentDataObj;478 }479 public String getEnvironmentData() {480 return environmentData;481 }482 public void setEnvironmentData(String environmentData) {483 this.environmentData = environmentData;484 }485 public boolean isManualURL() {486 return manualURL;487 }488 public void setManualURL(boolean manualURL) {489 this.manualURL = manualURL;490 }491 public String getMyHost() {492 return myHost;493 }494 public void setMyHost(String myHost) {495 this.myHost = myHost;496 }497 public String getMyContextRoot() {498 return myContextRoot;499 }500 public void setMyContextRoot(String myContextRoot) {501 this.myContextRoot = myContextRoot;502 }503 public String getMyLoginRelativeURL() {504 return myLoginRelativeURL;505 }506 public void setMyLoginRelativeURL(String myLoginRelativeURL) {507 this.myLoginRelativeURL = myLoginRelativeURL;508 }509 public String getOutputFormat() {510 return outputFormat;511 }512 public void setOutputFormat(String outputFormat) {513 this.outputFormat = outputFormat;514 }515 public int getScreenshot() {516 return screenshot;517 }518 public void setScreenshot(int screenshot) {519 this.screenshot = screenshot;520 }521 public MessageGeneral getResultMessage() {522 return resultMessage;523 }524 public void setResultMessage(MessageGeneral resultMessage) {525 this.resultMessage = resultMessage;526 if (resultMessage != null) {527 this.setControlMessage(resultMessage.getDescription());528 this.setControlStatus(resultMessage.getCodeString());529 }530 }531 public List<TestCaseExecutionFile> getFileList() {532 return fileList;533 }534 public void setFileList(List<TestCaseExecutionFile> fileList) {535 this.fileList = fileList;536 }537 public void addFileList(TestCaseExecutionFile file) {538 if (file != null) {539 this.fileList.add(file);540 }541 }542 public void addFileList(List<TestCaseExecutionFile> fileList) {543 if (fileList != null) {544 for (TestCaseExecutionFile testCaseExecutionFile : fileList) {545 this.fileList.add(testCaseExecutionFile);546 }547 }548 }549 public List<TestCaseStepExecution> getTestCaseStepExecutionList() {550 return testCaseStepExecutionList;551 }552 public void setTestCaseStepExecutionList(List<TestCaseStepExecution> testCaseStepExecutionList) {553 this.testCaseStepExecutionList = testCaseStepExecutionList;554 }555 public void addTestCaseStepExecutionList(TestCaseStepExecution testCaseStepExecution) {556 if (testCaseStepExecution != null) {557 this.testCaseStepExecutionList.add(testCaseStepExecution);558 }559 }560 public void addTestCaseStepExecutionList(List<TestCaseStepExecution> testCaseStepExecutionList) {561 if (testCaseStepExecutionList != null) {562 for (TestCaseStepExecution testCaseStepExecution : testCaseStepExecutionList) {563 this.testCaseStepExecutionList.add(testCaseStepExecution);564 }565 }566 }567 public String getSeleniumIPUser() {568 return seleniumIPUser;569 }570 public void setSeleniumIPUser(String seleniumIPUser) {571 this.seleniumIPUser = seleniumIPUser;572 }573 public String getSeleniumIPPassword() {574 return seleniumIPPassword;575 }576 public void setSeleniumIPPassword(String seleniumIPPassword) {577 this.seleniumIPPassword = seleniumIPPassword;578 }579 public String getSeleniumIP() {580 return seleniumIP;581 }582 public void setSeleniumIP(String seleniumIP) {583 this.seleniumIP = seleniumIP;584 }585 public String getSeleniumPort() {586 return seleniumPort;587 }588 public void setSeleniumPort(String seleniumPort) {589 this.seleniumPort = seleniumPort;590 }591 public CountryEnvParam getCountryEnvParam() {592 return countryEnvParam;593 }594 public void setCountryEnvParam(CountryEnvParam countryEnvParam) {595 this.countryEnvParam = countryEnvParam;596 }597 public CountryEnvironmentParameters getCountryEnvironmentParameters() {598 return countryEnvironmentParameters;599 }600 public void setCountryEnvironmentParameters(CountryEnvironmentParameters countryEnvironmentParameters) {601 this.countryEnvironmentParameters = countryEnvironmentParameters;602 }603 public Test getTestObj() {604 return testObj;605 }606 public void setTestObj(Test testObj) {607 this.testObj = testObj;608 }609 public TestCase getTestCaseObj() {610 return testCaseObj;611 }612 public void setTestCaseObj(TestCase testCase) {613 this.testCaseObj = testCase;614 }615 public Application getApplicationObj() {616 return applicationObj;617 }618 public void setApplicationObj(Application applicationObj) {619 this.applicationObj = applicationObj;620 }621 public String getBrowser() {622 return browser;623 }624 public void setBrowser(String browser) {625 this.browser = browser;626 }627 public String getBuild() {628 return build;629 }630 public void setBuild(String build) {631 this.build = build;632 }633 public String getControlMessage() {634 return controlMessage;635 }636 public void setControlMessage(String controlMessage) {637 this.controlMessage = controlMessage;638 }639 public String getControlStatus() {640 return controlStatus;641 }642 public void setControlStatus(String controlStatus) {643 this.controlStatus = controlStatus;644 }645 public String getCountry() {646 return country;647 }648 public void setCountry(String country) {649 this.country = country;650 }651 public String getCrbVersion() {652 return crbVersion;653 }654 public void setCrbVersion(String crbVersion) {655 this.crbVersion = crbVersion;656 }657 public long getEnd() {658 return end;659 }660 public void setEnd(long end) {661 this.end = end;662 }663 public String getEnvironment() {664 return environment;665 }666 public void setEnvironment(String environment) {667 this.environment = environment;668 }669 public long getId() {670 return id;671 }672 public void setId(long id) {673 this.id = id;674 }675 public String getRobot() {676 return robot;677 }678 public void setRobot(String robot) {679 this.robot = robot;680 }681 public String getRobotExecutor() {682 return robotExecutor;683 }684 public void setRobotExecutor(String robotExecutor) {685 this.robotExecutor = robotExecutor;686 }687 public String getRobotHost() {688 return robotHost;689 }690 public void setRobotHost(String robotHost) {691 this.robotHost = robotHost;692 }693 public String getRobotPort() {694 return robotPort;695 }696 public void setRobotPort(String robotPort) {697 this.robotPort = robotPort;698 }699 public String getRevision() {700 return revision;701 }702 public void setRevision(String revision) {703 this.revision = revision;704 }705 public long getStart() {706 return start;707 }708 public void setStart(long start) {709 this.start = start;710 }711 public String getStatus() {712 return status;713 }714 public void setStatus(String status) {715 this.status = status;716 }717 public String getTag() {718 return tag;719 }720 public void setTag(String tag) {721 this.tag = tag;722 }723 public Tag getTagObj() {724 return tagObj;725 }726 public void setTagObj(Tag tagObj) {727 this.tagObj = tagObj;728 }729 public String getTest() {730 return test;731 }732 public void setTest(String test) {733 this.test = test;734 }735 public String getTestCase() {736 return testCase;737 }738 public void setTestCase(String testCase) {739 this.testCase = testCase;740 }741 public String getUrl() {742 return url;743 }744 public void setUrl(String url) {745 this.url = url;746 }747 public int getVerbose() {748 return verbose;749 }750 public void setVerbose(int verbose) {751 this.verbose = verbose;752 }753 public String getExecutor() {754 return executor;755 }756 public void setExecutor(String executor) {757 this.executor = executor;758 }759 public String getScreenSize() {760 return screenSize;761 }762 public void setScreenSize(String screenSize) {763 this.screenSize = screenSize;764 }765 public int getTestCaseVersion() {766 return this.testCaseVersion;767 }768 public void setTestCaseVersion(int testCaseVersion) {769 this.testCaseVersion = testCaseVersion;770 }771 public int getTestCasePriority() {772 return testCasePriority;773 }774 public void setTestCasePriority(int testCasePriority) {775 this.testCasePriority = testCasePriority;776 }777 public List<String> getVideos() {778 return videos;779 }780 public void setVideos(List<String> videos) {781 this.videos = videos;782 }783 public List<TestCaseExecutionQueueDep> getTestCaseExecutionQueueDepList() {784 return testCaseExecutionQueueDepList;785 }786 public void setTestCaseExecutionQueueDep(List<TestCaseExecutionQueueDep> testCaseExecutionQueueDep) {787 this.testCaseExecutionQueueDepList = testCaseExecutionQueueDep;788 }789 public Integer getRemoteProxyPort() {790 return remoteProxyPort;791 }792 public void setRemoteProxyPort(Integer remoteProxyPort) {793 this.remoteProxyPort = remoteProxyPort;794 }795 public String getRemoteProxyUUID() {796 return remoteProxyUUID;797 }798 public void setRemoteProxyUUID(String remoteProxyUUID) {799 this.remoteProxyUUID = remoteProxyUUID;800 }801 public String getRemoteProxyLastHarMD5() {802 return remoteProxyLastHarMD5;803 }804 public void setRemoteProxyLastHarMD5(String remoteProxyLastHarMD5) {805 this.remoteProxyLastHarMD5 = remoteProxyLastHarMD5;806 }807 /**808 * Convert the current TestCaseExecution into JSON format809 *810 * @param withChilds boolean that define if childs should be included811 * @return TestCaseExecution in JSONObject format812 */813 public JSONObject toJson(boolean withChilds) {814 JSONObject result = new JSONObject();815 try {816 result.put("type", "testCaseExecution");817 result.put("id", this.getId());818 result.put("test", this.getTest());819 result.put("testcase", this.getTestCase());820 result.put("description", this.getDescription());821 result.put("build", this.getBuild());822 result.put("revision", this.getRevision());823 result.put("environment", this.getEnvironment());824 result.put("environmentData", this.getEnvironmentData());825 result.put("country", this.getCountry());826 result.put("browser", this.getBrowser());827 result.put("version", this.getVersion());828 result.put("platform", this.getPlatform());829 result.put("start", this.getStart());830 result.put("end", this.getEnd());831 result.put("controlStatus", this.getControlStatus());832 result.put("controlMessage", this.getControlMessage());833 result.put("application", this.getApplication());834 result.put("robot", this.getRobot());835 result.put("robotExecutor", this.getRobotExecutor());836 result.put("robotHost", this.getRobotHost());837 result.put("robotPort", this.getRobotPort());838 result.put("url", this.getUrl());839 result.put("tag", this.getTag());840 result.put("verbose", this.getVerbose());841 result.put("status", this.getStatus());842 result.put("crbVersion", this.getCrbVersion());843 result.put("executor", this.getExecutor());844 result.put("screenSize", this.getScreenSize());845 result.put("conditionOper", this.getConditionOper());846 result.put("conditionVal1Init", this.getConditionVal1Init());847 result.put("conditionVal2Init", this.getConditionVal2Init());848 result.put("conditionVal3Init", this.getConditionVal3Init());849 result.put("conditionVal1", this.getConditionVal1());850 result.put("conditionVal2", this.getConditionVal2());851 result.put("conditionVal3", this.getConditionVal3());852 result.put("userAgent", this.getUserAgent());853 result.put("queueId", this.getQueueID());854 result.put("manualExecution", this.getManualExecution());855 result.put("testCaseVersion", this.getTestCaseVersion());856 result.put("system", this.getSystem());857 result.put("robotDecli", this.getRobotDecli());858 result.put("robotProvider", this.getRobotProvider());859 result.put("robotSessionId", this.getRobotSessionID());860 result.put("videos", this.getVideos());861 result.put("previousExeId", this.getPreviousExeId());862 result.put("previousExeStatus", this.getPreviousExeStatus());863 result.put("usrCreated", this.getUsrCreated());864 result.put("dateCreated", this.getDateCreated());865 result.put("usrModif", this.getUsrModif());866 result.put("dateModif", this.getDateModif());867 if (withChilds) {868 // Looping on ** Step **869 JSONArray array = new JSONArray();870 if (this.getTestCaseStepExecutionList() != null) {871 for (Object testCaseStepExecution : this.getTestCaseStepExecutionList()) {872 array.put(((TestCaseStepExecution) testCaseStepExecution).toJson(true, false));873 }874 }875 result.put("testCaseStepExecutionList", array);876 array = new JSONArray();877 if (this.getTestCaseExecutionQueueDepList() != null) {878 for (Object tceQDep : this.getTestCaseExecutionQueueDepList()) {879 array.put(((TestCaseExecutionQueueDep) tceQDep).toJson());880 }881 }882 result.put("testCaseExecutionQueueDepList", array);883 // ** TestCase **884 if (this.getTestCaseObj() != null) {885 TestCase tc = this.getTestCaseObj();886 result.put("testCaseObj", tc.toJson());887 }888 // ** Tag **889 if (this.getTagObj() != null) {890 Tag tagO = this.getTagObj();891 result.put("tagObj", tagO.toJsonLight());892 }893 // Looping on ** Execution Data **894 array = new JSONArray();895 for (String key1 : this.getTestCaseExecutionDataMap().keySet()) {896 TestCaseExecutionData tced = (TestCaseExecutionData) this.getTestCaseExecutionDataMap().get(key1);897 array.put((tced).toJson(true, false));898 }899 result.put("testCaseExecutionDataList", array);900 // Looping on ** Media File Execution **901 array = new JSONArray();902 if (this.getFileList() != null) {903 for (Object testCaseFileExecution : this.getFileList()) {904 array.put(((TestCaseExecutionFile) testCaseFileExecution).toJson());905 }906 }907 result.put("fileList", array);908 }909 } catch (JSONException ex) {910 LOG.error(ex.toString(), ex);911 } catch (Exception ex) {912 LOG.error(ex.toString(), ex);913 }914 return result;915 }916}...

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