use of com.qasymphony.ci.plugin.model.qtest.Container in project jenkin-qtest-plugin by QASymphony.
the class Configuration method createJunitSubmitRequest.
public JunitSubmitterRequest createJunitSubmitRequest() {
Long containerID = this.releaseId;
String containerType = "release";
Container container = null;
if (submitToContainer) {
container = this.getContainerInfo();
if (null == container) {
return null;
}
containerID = container.getId();
containerType = container.getType();
}
JunitSubmitterRequest request = new JunitSubmitterRequest();
request.setqTestURL(this.url).setApiKey(this.appSecretKey).setConfigurationID(this.id).setSubmitToExistingContainer(this.submitToContainer).setContainerID(containerID).setContainerType(containerType).setCreateNewTestRunsEveryBuildDate(null != container ? container.getCreateNewTestSuiteEveryBuild() : null).setEnvironmentID(this.environmentId).setEnvironmentParentID(this.environmentParentId).setJenkinsProjectName(this.jenkinsProjectName).setModuleID(this.moduleId).setJenkinsServerURL(this.jenkinsServerUrl).setProjectID(this.projectId);
return request;
}
use of com.qasymphony.ci.plugin.model.qtest.Container in project jenkin-qtest-plugin by QASymphony.
the class Configuration method getContainerInfo.
private Container getContainerInfo() {
long nodeId = -1;
String nodeType = "";
boolean createTestSuiteEveryBuildDate = false;
try {
JSONObject json = JSONObject.fromObject(this.containerSetting);
JSONObject selectedContainer = json.getJSONObject("selectedContainer");
if (selectedContainer.has("dailyCreateTestSuite")) {
createTestSuiteEveryBuildDate = selectedContainer.getBoolean("dailyCreateTestSuite");
}
JSONArray containerPath = JSONArray.fromObject(json.getString("containerPath"));
if (0 < containerPath.size()) {
JSONObject jsonContainer = containerPath.getJSONObject(containerPath.size() - 1);
if (null != jsonContainer) {
nodeType = jsonContainer.getString("nodeType");
nodeId = jsonContainer.getLong("nodeId");
}
}
} catch (Exception ex) {
ex.printStackTrace();
return null;
}
Container container = new Container();
container.setId(nodeId);
container.setType(nodeType);
container.setCreateNewTestSuiteEveryBuild(createTestSuiteEveryBuildDate);
return container;
}
use of com.qasymphony.ci.plugin.model.qtest.Container in project jenkin-qtest-plugin by QASymphony.
the class PipelineConfiguration method getContainerInfo.
private Container getContainerInfo() {
Container container = new Container();
container.setId(this.containerID);
container.setType(this.containerType.toLowerCase());
container.setCreateNewTestSuiteEveryBuild(this.createNewTestRunsEveryBuildDate);
return container;
}
Aggregations