Commit 13f7990f authored by Malo Toudic's avatar Malo Toudic
Browse files

corrections after test day

git-svn-id: https://scm.gforge.inria.fr/authscm/ycadoret/svn/gazelle/Maven/simulators/gazelle-webservice-tester/trunk@61886 356b4b1a-1d2b-0410-8bf1-ffa24008f01e
parent cc7c6b27
......@@ -60,3 +60,5 @@ SET disable = FALSE;
INSERT INTO app_configuration (id, variable, value)
VALUES (nextval('app_configuration_id_seq'), 'ehealthsuisse', 'false');
......@@ -45,12 +45,12 @@ public class ExecutionList implements Serializable {
criterion.addPath("launchBy", query.launchBy());
criterion.addPath("launchDate", query.launchDate());
criterion.addPath("company", query.company(), null, CompanyValueProvider.SINGLETON());
criterion.addPath("project", query.soapuiProject().label());
criterion.addPath("component", query.testComponent().label());
criterion.addPath("soapuiProject", query.soapuiProject().label());
criterion.addPath("testComponent", query.testComponent().label());
HQLSafePathBasicNumber instance = query.testInstanceResult().testInstance();
instance.setMinValue(0);
instance.setMaxValue(100000);
criterion.addPath("testInstance", instance);
criterion.addPath("testInstanceResult", instance);
return criterion;
}
......
......@@ -68,19 +68,15 @@ public class ProjectList implements Serializable {
for (GwtTestStep gwtTestStep : gwtTestCase.getTestSteps()) {
deleteCustomProperties(gwtTestStep, entityManager);
entityManager.remove(gwtTestStep);
entityManager.flush();
}
deleteCustomProperties(gwtTestCase, entityManager);
entityManager.remove(gwtTestCase);
entityManager.flush();
}
deleteCustomProperties(gwtTestSuite, entityManager);
entityManager.remove(gwtTestSuite);
entityManager.flush();
}
deleteCustomProperties(project.getGwtProject(), entityManager);
entityManager.remove(project.getGwtProject());
entityManager.flush();
entityManager.remove(project);
entityManager.flush();
return true;
......
......@@ -11,7 +11,6 @@ public class GwtTestStepDao {
private static final Logger LOG = LoggerFactory.getLogger(GwtTestStepDao.class);
public static GwtTestStep getGwtTestStep(String labelTestStep, String labelTestCase, String labelTestSuite, String project) {
LOG.warn(project);
GwtTestStepQuery query = new GwtTestStepQuery();
query.label().eq(labelTestStep);
query.testCase().label().eq(labelTestCase);
......
......@@ -12,7 +12,7 @@ public class GwtTestSuiteDao {
public static GwtTestSuite getGwtTestSuite(String label, String project) {
GwtTestSuiteQuery query = new GwtTestSuiteQuery();
query.label().eq(label);
query.gwtProject().label().eq(project);
query.gwtProject().soapuiProject().label().eq(project);
return query.getUniqueResult();
}
}
......@@ -152,8 +152,6 @@ public class GwtProject extends TestComponent implements Serializable {
@Override
public int hashCode() {
int result = soapuiProject.hashCode();
result = 31 * result + testSuites.hashCode();
return result;
return testSuites.hashCode();
}
}
......@@ -139,7 +139,7 @@ public class SoapuiProject implements Serializable {
public String getLink() {
if (PreferenceService.getString("application_url") != null) {
return PreferenceService.getString("application_url") + "/projectDetail.seam?id=" + this.getId();
return PreferenceService.getString("application_url") + "/project/projectDetail.seam?id=" + this.getId();
} else {
LOGGER.error("The preference application_url is not set : can't display project link");
return null;
......
......@@ -48,6 +48,10 @@ public class Xdstools {
GazelleTRMServiceClient gazelleTRMServiceClient;
Integer testingSession = null;
String systemKeyword = null;
String actor = null;
String integrationProfile = null;
String integrationProfileOption = null;
String actorCode = null;
try {
gazelleTRMServiceClient = new GazelleTRMServiceClient(callingTool.getUrl() + "/gazelle-tm-ejb/GazelleTRMService/gazelleTRM");
GazelleTRMServiceStub.TrmTestInstance trmTestInstance = gazelleTRMServiceClient.getTestInstanceById(testInstanceId);
......@@ -58,8 +62,12 @@ public class Xdstools {
GazelleTRMServiceStub.TrmParticipant[] trmParticipantTab = trmTestInstance.getParticipants();
for (GazelleTRMServiceStub.TrmParticipant trmParticipant : trmParticipantTab) {
if (gazelleTRMServiceClient.getSystemIsATool(trmParticipant.getSystem(), testingSession)) {
if (!gazelleTRMServiceClient.getSystemIsATool(trmParticipant.getSystem(), testingSession)) {
systemKeyword = trmParticipant.getSystem();
actor = trmParticipant.getAipo().getActor();
integrationProfile = trmParticipant.getAipo().getIntegrationProfile();
integrationProfileOption = trmParticipant.getAipo().getIntegrationProfileOption();
}
}
if (systemKeyword == null) {
......@@ -99,8 +107,9 @@ public class Xdstools {
} else {
String url = PreferenceService.getString("xdstools_url") + "CasSessionBuilder?testingSessionId=" + testingSession + ";systemName=" + systemKeyword;
String response = getHTML(url);
getActorCode(actor);
if (response != null && !response.isEmpty()) {
String redirectUrl = PreferenceService.getString("xdstools_url") + "Xdstools2.html#ConfActor:default/" + response + "/rg";
String redirectUrl = PreferenceService.getString("xdstools_url") + "Xdstools2.html#ConfActor:default/" + response + "/" + getActorCode(actor) + "/"+ getIntegrationProfileCode(integrationProfile) + "/" + getIntegrationProfileOptionCode(integrationProfileOption) + "/" + systemKeyword;
Nonce nonce = new Nonce(response, redirectUrl);
TestInstanceTm newTestInstanceTm = new TestInstanceTm(testInstanceId, systemKeyword, testingSession, nonce, callingTool);
nonce.addTestInstanceTm(newTestInstanceTm);
......@@ -160,4 +169,34 @@ public class Xdstools {
redirect.append("</html>\n");
return redirect.toString();
}
public String getActorCode (String actor){
if(actor.equals("DOC_REPOSITORY")){
return "rep";
} else if(actor.equals("DOC_REGISTRY")){
return "reg";
} else if(actor.equals("DOC_CONSUMER")){
return "";
} else {
return "";
}
}
public String getIntegrationProfileCode (String integrationProfile){
if(integrationProfile.equals("XDS.b")) {
return "xds";
} else if (integrationProfile.equals("XDS-I.b")) {
return "xds-i";
} else {
return "";
}
}
public String getIntegrationProfileOptionCode (String integrationProfileOption){
if(integrationProfileOption.equals("NONE")){
return "";
} else {
return "";
}
}
}
......@@ -83,10 +83,10 @@
<f:facet name="footer">
<a4j:commandButton id="mergeCallingTool" styleClass="gzl-btn-green" value="Validate"
actionListener="#{callingToolManager.merge()}"
render="globalForm"/>
render="globalForm, newCallingToolForm"/>
<a4j:commandButton id="cancel" styleClass="gzl-btn" value="Cancel"
actionListener="#{callingToolManager.cancel()}"
render="globalForm" immediate="true"/>
render="globalForm, newCallingToolForm" immediate="true"/>
</f:facet>
</gri:panel>
......
......@@ -110,8 +110,8 @@
<h:commandButton value="Cancel"
styleClass="btn btn-default"
oncomplete="jq162('#popupDelete').modal('hide');"/>
<a4j:commandButton value="Yes"
styleClass="btn btn-primary"
<a4j:commandButton value="Delete"
styleClass="gzl-btn-red"
actionListener="#{keystoreManager.delete()}"
oncomplete="jq162('#popupDelete').modal('hide');"
render="globalForm"/>
......
......@@ -10,7 +10,7 @@
<ui:define name="panel_title">#{messages['gazelle.simu.SearchCriteria']}</ui:define>
<ui:include src="/filter/filterNumber.xhtml">
<ui:param name="filter" value="#{executionList.filter}"/>
<ui:param name="filterId" value="testInstance"/>
<ui:param name="filterId" value="testInstanceResult"/>
<ui:param name="filterName" value="Test Instance"/>
<ui:param name="filterForm" value="globalForm"/>
</ui:include>
......@@ -28,13 +28,13 @@
</ui:include>
<ui:include src="/filter/filter.xhtml">
<ui:param name="filter" value="#{executionList.filter}"/>
<ui:param name="filterId" value="component"/>
<ui:param name="filterId" value="testComponent"/>
<ui:param name="filterName" value="Component executed"/>
<ui:param name="filterForm" value="globalForm"/>
</ui:include>
<ui:include src="/filter/filter.xhtml">
<ui:param name="filter" value="#{executionList.filter}"/>
<ui:param name="filterId" value="project"/>
<ui:param name="filterId" value="soapuiProject"/>
<ui:param name="filterName" value="Project"/>
<ui:param name="filterForm" value="globalForm"/>
</ui:include>
......@@ -68,21 +68,17 @@
#{execution.id}
</h:outputLink>
</g:column>
<g:column sortBy="#{'project'}" filterBy="#{'project'}">
<g:column sortBy="#{'soapuiProject'}" filterBy="#{'soapuiProject'}">
<ui:define name="header">Project</ui:define>
<h:outputText value="#{execution.soapuiProject.label}"/>
</g:column>
<g:column sortBy="#{'testInstance'}" filterBy="#{'testInstance'}">
<g:column sortBy="#{'testInstanceResult'}" filterBy="#{'testInstanceResult'}">
<ui:define name="header">Test Instance</ui:define>
<h:outputText value="#{execution.testInstanceResult.testInstance}"
rendered="#{execution.testInstanceResult.testInstance != null}"/>
<h:outputText value="#{execution.testInstanceResult.testInstance}"/>
</g:column>
<g:column sortBy="#{'component'}" filterBy="#{'component'}">
<g:column sortBy="#{'testComponent'}" filterBy="#{'testComponent'}">
<ui:define name="header">Component executed</ui:define>
<h:outputText value="#{execution.getTestComponentToString()}"
rendered="#{execution.testComponent != null}"/>
<h:outputText value="#{execution.testInstanceResult.testSuite}"
rendered="#{execution.testComponent == null and execution.testInstanceResult.testSuite != null}"/>
<h:outputText value="#{execution.getTestComponentToString()}"/>
</g:column>
<g:column sortBy="#{'launchBy'}" filterBy="#{'launchBy'}">
<ui:define name="header">Executed by</ui:define>
......
......@@ -12,10 +12,15 @@
<h:outputText value="Execution"/>
</f:facet>
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Soapui project</ui:define>
<h:outputText value="#{executionResult.getSoapuiProject()}"/>
</s:decorate>
<s:div rendered="#{executionResult.execution.soapuiProject != null}">
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Soapui Project</ui:define>
<h:outputLink
value="#{executionResult.execution.soapuiProject.getLink()}"
target="_blank">#{executionResult.execution.soapuiProject.label}
</h:outputLink>
</s:decorate>
</s:div>
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Execute by</ui:define>
......@@ -41,16 +46,6 @@
styleClass="gzl-label #{executionResult.execution.getGlobalStatus()}"/>
</s:decorate>
<s:div rendered="#{executionResult.execution.soapuiProject != null}">
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Soapui Project</ui:define>
<h:outputLink
value="#{executionResult.execution.soapuiProject.getLink()}"
target="_blank">#{executionResult.execution.soapuiProject.label}
</h:outputLink>
</s:decorate>
</s:div>
<s:div rendered="#{executionResult.execution.testComponent != null}">
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Component executed</ui:define>
......
......@@ -139,11 +139,6 @@
styleClass="gzl-btn-blue"
rendered="#{projectDetail.editProject == false and s:hasRole('admin_role') and projectDetail.projectDetail.soapuiProject.active == false}"
render="pageDiv"/>
<!-- <a4j:commandButton value="Edit" action="#{projectDetail.setEditProject(true)}"
styleClass="gzl-btn-blue" rendered="#{projectDetail.editProject == false and s:hasRole('admin_role')}" render="pageDiv"/>
<h:commandButton value="Save" action="#{projectDetail.saveEditProject()}"
styleClass="gzl-btn-blue" render="pageDiv" rendered="#{projectDetail.editProject}"/>
<h:commandButton value="Cancel" action="#{projectDetail.setEditProject(false)}" styleClass="gzl-btn" rendered="#{projectDetail.editProject}" immediate="true" render="pageDiv"/> -->
</f:facet>
</gri:panel>
</s:div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment