Commit 7b0ecad2 authored by Malo Toudic's avatar Malo Toudic
Browse files
parent 8dce8ce5
......@@ -121,6 +121,13 @@ public class ExecutionResult {
return false;
}
public boolean isCustomPropertyUsedListEmpty(){
if(customPropertyUsedList != null && customPropertyUsedList.isEmpty()){
return true;
}
return false;
}
public GazelleTreeNodeImpl<TestComponent> getComponentWithParentsAsTree() {
return Tree.getComponentWithParentsAsTree(execution.getTestComponent());
}
......
......@@ -87,283 +87,381 @@
</s:decorate>
</gri:panel>
<rich:dataTable id="summary" value="#{executionResult.execution.testStepResults}" var="testStepResult">
<g:column>
<ui:define name="header">Transaction</ui:define>
<h:outputText value="#{testStepResult.testStep.label}"/>
</g:column>
<g:column>
<ui:define name="header">SoapUI Validation</ui:define>
<s:div>
<h:outputText value="#{testStepResult.getStatusForCss()}"
styleClass="gzl-label #{testStepResult.getStatusForCss()}"/>
</s:div>
</g:column>
<g:column>
<ui:define name="header">Request validation</ui:define>
<s:div rendered="#{testStepResult.getRequestValidation() != null}">
<h:outputText value="#{testStepResult.getRequestValidation().validationStatus}"
styleClass="gzl-label #{testStepResult.getRequestValidation().validationStatus}"/>
</s:div>
<s:div rendered="#{testStepResult.getRequestValidation() == null}">
<h:commandLink actionListener="#{testStepResult.validateRequest()}"
target="_blank">
<s:span title="Validate request" styleClass="gzl-icon-play-blue"/>
</h:commandLink>
</s:div>
</g:column>
<g:column>
<ui:define name="header">Response validation</ui:define>
<s:div rendered="#{testStepResult.getResponseValidation() != null}">
<h:outputText value="#{testStepResult.getResponseValidation().validationStatus}"
styleClass="gzl-label #{testStepResult.getResponseValidation().validationStatus}"/>
</s:div>
<s:div rendered="#{testStepResult.getResponseValidation() == null}">
<h:commandLink actionListener="#{testStepResult.validateResponse()}"
target="_blank">
<s:span title="Validate response" styleClass="gzl-icon-play-blue"/>
</h:commandLink>
</s:div>
</g:column>
<g:column>
<ui:define name="header">Cross-Validation</ui:define>
<h:outputText value="Not yet implemented"/>
</g:column>
</rich:dataTable>
<ui:decorate template="/layout/panels/_panel_collapse.xhtml">
<ui:param name="panel_id" value="collapsed_panel"/>
<ui:param name="openByDefault" value="false"/>
<ui:define name="panel_title">
<h:outputText value="Properties used"/>
</ui:define>
<div class="row">
<div class="col-md-6">
<rich:tree id="treeOfParams" value="#{executionResult.getComponentWithParentsAsTree()}"
var="node">
<rich:treeNode iconExpanded="images/testcase.png"
iconCollapsed="images/testcase.png"
rendered="#{node.data.getClass().getSimpleName() == 'GwtTestCase'}"
expanded="true">
<a4j:commandLink render="paramPanel" ajaxSingle="true"
actionListener="#{executionResult.setCustomPropertyUsedList(node.data)}"
value="#{node.data.label}"/>
</rich:treeNode>
<rich:treeNode iconExpanded="images/testsuite.png"
iconCollapsed="images/testsuite.png"
rendered="#{node.data.getClass().getSimpleName() == 'GwtTestSuite'}"
expanded="true">
<a4j:commandLink render="paramPanel" ajaxSingle="true"
actionListener="#{executionResult.setCustomPropertyUsedList(node.data)}"
value="#{node.data.label}"/>
</rich:treeNode>
<rich:treeNode iconExpanded="images/project.png"
iconCollapsed="images/project.png"
rendered="#{node.data.getClass().getSimpleName() == 'GwtProject'}"
expanded="true">
<a4j:commandLink render="paramPanel" ajaxSingle="true"
actionListener="#{executionResult.setCustomPropertyUsedList(node.data)}"
value="#{node.data.label}"/>
</rich:treeNode>
</rich:tree>
<div id="summary">
<ui:decorate template="/layout/panels/_panel_collapse.xhtml">
<ui:param name="panel_id" value="summary_panel"/>
<ui:param name="openByDefault" value="true"/>
<ui:define name="panel_title">
<h:outputText value="Summary"/>
</ui:define>
<rich:dataTable value="#{executionResult.execution.testStepResults}"
var="testStepResult">
<g:column>
<ui:define name="header">Transaction</ui:define>
<h:outputText value="#{testStepResult.testStep.label}"/>
</g:column>
<g:column>
<ui:define name="header">SoapUI Validation</ui:define>
<s:div>
<h:outputText value="#{testStepResult.getStatusForCss()}"
styleClass="gzl-label #{testStepResult.getStatusForCss()}"/>
</s:div>
</g:column>
<g:column>
<ui:define name="header">Request validation</ui:define>
<s:div rendered="#{testStepResult.getRequestValidation() != null}">
<h:outputText value="#{testStepResult.getRequestValidation().validationStatus}"
styleClass="gzl-label #{testStepResult.getRequestValidation().validationStatus}"/>
</s:div>
<s:div rendered="#{testStepResult.getRequestValidation() == null}">
<h:commandLink actionListener="#{testStepResult.validateRequest()}"
target="_blank">
<s:span title="Validate request" styleClass="gzl-icon-play-blue"/>
</h:commandLink>
</s:div>
</g:column>
<g:column>
<ui:define name="header">Response validation</ui:define>
<s:div rendered="#{testStepResult.getResponseValidation() != null}">
<h:outputText value="#{testStepResult.getResponseValidation().validationStatus}"
styleClass="gzl-label #{testStepResult.getResponseValidation().validationStatus}"/>
</s:div>
<s:div rendered="#{testStepResult.getResponseValidation() == null}">
<h:commandLink actionListener="#{testStepResult.validateResponse()}"
target="_blank">
<s:span title="Validate response" styleClass="gzl-icon-play-blue"/>
</h:commandLink>
</s:div>
</g:column>
<g:column>
<ui:define name="header">Cross-Validation</ui:define>
<h:outputText value="Not yet implemented"/>
</g:column>
</rich:dataTable>
</ui:decorate>
</div>
<div id="properties">
<ui:decorate template="/layout/panels/_panel_collapse.xhtml">
<ui:param name="panel_id" value="properties_panel"/>
<ui:param name="openByDefault" value="false"/>
<ui:define name="panel_title">
<h:outputText value="Properties used"/>
</ui:define>
<div class="row">
<div class="col-md-6">
<rich:tree id="treeOfParams" value="#{executionResult.getComponentWithParentsAsTree()}"
var="node">
<rich:treeNode iconExpanded="images/testcase.png"
iconCollapsed="images/testcase.png"
rendered="#{node.data.getClass().getSimpleName() == 'GwtTestCase'}"
expanded="true">
<a4j:commandLink render="paramPanel" ajaxSingle="true"
actionListener="#{executionResult.setCustomPropertyUsedList(node.data)}"
value="#{node.data.label}"/>
</rich:treeNode>
<rich:treeNode iconExpanded="images/testsuite.png"
iconCollapsed="images/testsuite.png"
rendered="#{node.data.getClass().getSimpleName() == 'GwtTestSuite'}"
expanded="true">
<a4j:commandLink render="paramPanel" ajaxSingle="true"
actionListener="#{executionResult.setCustomPropertyUsedList(node.data)}"
value="#{node.data.label}"/>
</rich:treeNode>
<rich:treeNode iconExpanded="images/project.png"
iconCollapsed="images/project.png"
rendered="#{node.data.getClass().getSimpleName() == 'GwtProject'}"
expanded="true">
<a4j:commandLink render="paramPanel" ajaxSingle="true"
actionListener="#{executionResult.setCustomPropertyUsedList(node.data)}"
value="#{node.data.label}"/>
</rich:treeNode>
</rich:tree>
</div>
<div class="col-md-6">
<s:div id="paramPanel">
<gri:panel>
<f:facet name="header">
<h:outputText value="Parameters"/>
</f:facet>
<rich:list value="#{executionResult.customPropertyUsedList}" id="list"
var="propertySelected"
type="unordered"
rendered="#{not executionResult.isCustomPropertyUsedListEmpty()}">
<s:decorate template="/layout/form/_checkbox.xhtml">
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">#{propertySelected.customProperty.label}
</ui:define>
<h:outputText value="#{propertySelected.value}"/>
</s:decorate>
</s:decorate>
</rich:list>
<rich:panel styleClass="gzl-alert gzl-alert-blue"
rendered="#{executionResult.isCustomPropertyUsedListEmpty()}">
<h:outputText
value="There is no custom properties for this component"/>
</rich:panel>
</gri:panel>
</s:div>
</div>
</div>
<div class="col-md-6">
<s:div id="paramPanel">
</ui:decorate>
</div>
<div class="row">
<div class="col-lg-2 scrollspy">
<nav class="gzl-sidebar" id="nav-sidebar">
<h3>Navigation</h3>
<ul class="nav" id="nav">
<li>
<a href="#gzl-container">
<h:outputText value="Top of the page"/>
</a>
</li>
<li>
<a href="#summary">
<h:outputText value="Summary"/>
</a>
</li>
<li>
<a href="#properties">
<h:outputText value="Properties used"/>
</a>
</li>
<li>
<a href="#logs">
<h:outputText value="Logs"/>
</a>
</li>
<hr/>
<c:forEach items="#{executionResult.execution.testStepResults}" var="testStepResult">
<li>
<a href="#testStepResult#{testStepResult.id}">
<h:outputText value="#{testStepResult.testStep.label}"/>
</a>
</li>
</c:forEach>
</ul>
<!--@formatter:off-->
<script>
$(document).ready(function () {
var sidebarTop = $('#nav-sidebar').offset().top;
$(window).bind('scroll', function () {
var navHeight = sidebarTop;
if ($(window).scrollTop() > navHeight) {
$('nav#nav-sidebar').addClass(' gzl-affix-right');
}
else {
$('nav#nav-sidebar').removeClass(' gzl-affix-right');
}
});
});
</script>
<!--@formatter:on-->
</nav>
</div>
<div class="col-lg-10">
<c:forEach items="#{executionResult.execution.testStepResults}" var="testStepResult">
<div id="testStepResult#{testStepResult.id}">
<gri:panel>
<f:facet name="header">
<h:outputText value="Parameters"/>
<h:outputText value="#{testStepResult.testStep.label}"/>
</f:facet>
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">SoapUI Validation</ui:define>
<h:outputText value="#{testStepResult.getStatusForCss()}"
styleClass="gzl-label #{testStepResult.getStatusForCss()}"/>
</s:decorate>
<rich:list value="#{executionResult.customPropertyUsedList}" id="list"
var="propertySelected"
type="unordered">
<s:decorate template="/layout/form/_checkbox.xhtml">
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">#{propertySelected.customProperty.label}
</ui:define>
<h:outputText value="#{propertySelected.value}"/>
</s:decorate>
</s:decorate>
</rich:list>
</gri:panel>
</s:div>
</div>
</div>
</ui:decorate>
<gri:tabPanel rendered="#{not empty executionResult.execution.testStepResults}" withBorder="true">
<c:forEach items="#{executionResult.execution.testStepResults}" var="testStepResult">
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Endpoint</ui:define>
<h:outputText value="#{testStepResult.endpoint}"/>
</s:decorate>
<gri:tab head="#{testStepResult.testStep.label}">
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Timestamp</ui:define>
<h:outputText value="#{testStepResult.getTimestamp()}"/>
</s:decorate>
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">SoapUI Validation</ui:define>
<h:outputText value="#{testStepResult.getStatusForCss()}"
styleClass="gzl-label #{testStepResult.getStatusForCss()}"/>
</s:decorate>
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Time Taken</ui:define>
<h:outputText value="#{testStepResult.timeTaken} ms"/>
</s:decorate>
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Endpoint</ui:define>
<h:outputText value="#{testStepResult.endpoint}"/>
</s:decorate>
<gri:panel
rendered="#{testStepResult.soapUIMessages != null and testStepResult.soapUIMessages.size() != 0}">
<f:facet name="header">
<h:outputText value="SoapUI validation messages"/>
</f:facet>
<rich:list value="#{testStepResult.soapUIMessages}" id="list"
var="soapuiMessage"
type="unordered">
<h:outputText value="#{soapuiMessage}"/>
</rich:list>
</gri:panel>
<gri:panel>
<f:facet name="header">
<div class="row">
<div class="col-md-2">
<h:outputText value="Request"/>
<h:commandLink action="#{testStepResult.downloadRequest()}"
rendered="#{testStepResult.getRequestContent() != null}">
<s:span title="Download file"
styleClass="gzl-icon-download text-info"/>
</h:commandLink>
</div>
<div class="col-md-10" style="text-align:right">
<h:outputText value="EVS Validation : "></h:outputText>
<h:outputLink
value="#{testStepResult.getRequestValidation().permanentLink}"
target="_blank">
<h:outputText
value="#{testStepResult.getRequestValidation().permanentLink}"/>
</h:outputLink>
<h:outputText
value="#{testStepResult.getRequestValidation().validationStatus}"
styleClass="gzl-label #{testStepResult.getRequestValidation().validationStatus}"
rendered="#{testStepResult.getRequestValidation() != null}"/>
<h:commandLink actionListener="#{testStepResult.validateRequest()}"
rendered="#{testStepResult.getRequestValidation() == null}"
target="_blank">
<s:span title="Validate request"
styleClass="gzl-icon-play-blue"/>
</h:commandLink>
<h:commandLink actionListener="#{testStepResult.validateRequest()}"
target="_blank"
rendered="#{testStepResult.getRequestValidation() != null}">
<s:span title="Re-validate" styleClass="gzl-icon-repeat"/>
</h:commandLink>
</div>
</div>
</f:facet>
<s:div rendered="#{testStepResult.getRequestContent() != null}" style="overflow: auto">
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Timestamp</ui:define>
<h:outputText value="#{testStepResult.getTimestamp()}"/>
</s:decorate>
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Time Taken</ui:define>
<h:outputText value="#{testStepResult.timeTaken} ms"/>
</s:decorate>
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Timestamp</ui:define>
<h:outputText value="#{testStepResult.getTimestamp()}"/>
</s:decorate>
<gri:panel
rendered="#{testStepResult.soapUIMessages != null and testStepResult.soapUIMessages.size() != 0}">
<f:facet name="header">
<h:outputText value="SoapUI validation messages"/>
</f:facet>
<rich:list value="#{testStepResult.soapUIMessages}" id="list" var="soapuiMessage"
type="unordered">
<h:outputText value="#{soapuiMessage}"/>
</rich:list>
</gri:panel>
<h:outputText value="#{testStepResult.getRequestContent()}" escape="false"/>
</s:div>
<gri:panel>
<f:facet name="header">
<div class="row">
<div class="col-md-6">
<h:outputText value="Request"/>
<h:commandLink action="#{testStepResult.downloadRequest()}"
rendered="#{testStepResult.getRequestContent() != null}">
<s:span title="Download file" styleClass="gzl-icon-download text-info"/>
</h:commandLink>
</div>
<div class="col-md-6" style="text-align:right">
<rich:panel styleClass="gzl-alert gzl-alert-yellow"
rendered="#{testStepResult.getRequestContent() == null}">
<span class="gzl-icon-exclamation-triangle"/>
<h:outputText
value="#{testStepResult.getRequestValidation().validationStatus}"
styleClass="gzl-label #{testStepResult.getRequestValidation().validationStatus}"
rendered="#{testStepResult.getRequestValidation() != null}"/>
<h:commandLink actionListener="#{testStepResult.validateRequest()}"
rendered="#{testStepResult.getRequestValidation() == null}"
target="_blank">
<s:span title="Validate request" styleClass="gzl-icon-play-blue"/>
</h:commandLink>
<h:commandLink actionListener="#{testStepResult.validateRequest()}"
target="_blank"
rendered="#{testStepResult.getRequestValidation() != null}">
<s:span title="Re-validate" styleClass="gzl-icon-repeat"/>
</h:commandLink>
<h:outputLink value="#{testStepResult.getRequestValidation().permanentLink}"
target="_blank">
<s:span title="Validation result" styleClass="gzl-icon-link"/>
</h:outputLink>
</div>
</div>
</f:facet>
<s:div rendered="#{testStepResult.getRequestContent() != null}">
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Timestamp</ui:define>
<h:outputText value="#{testStepResult.getTimestamp()}"/>
</s:decorate>
value="No request found"/>
</rich:panel>
</gri:panel>
<gri:panel>
<f:facet name="header">
<div class="row">
<div class="col-md-2">
<h:outputText value="Response"/>
<h:commandLink action="#{testStepResult.downloadResponse()}"
rendered="#{testStepResult.getResponseContent() != null}">
<s:span title="Download file"
styleClass="gzl-icon-download text-info"/>
</h:commandLink>
</div>
<div class="col-md-10" style="text-align:right">
<h:outputText value="EVS Validation : "></h:outputText>
<h:outputLink
value="#{testStepResult.getResponseValidation().permanentLink}"
target="_blank">
<h:outputText
value="#{testStepResult.getResponseValidation().permanentLink}"/>
</h:outputLink>
<h:outputText
value="#{testStepResult.getResponseValidation().validationStatus}"
styleClass="gzl-label #{testStepResult.getResponseValidation().validationStatus}"
rendered="#{testStepResult.getResponseValidation() != null}"/>
<h:commandLink actionListener="#{testStepResult.validateResponse()}"
rendered="#{testStepResult.getResponseValidation() == null}"
target="_blank">
<s:span title="Validate request"
styleClass="gzl-icon-play-blue"/>
</h:commandLink>
<h:commandLink actionListener="#{testStepResult.validateResponse()}"
target="_blank"
rendered="#{testStepResult.getResponseValidation() != null}">
<s:span title="Re-validate" styleClass="gzl-icon-repeat"/>
</h:commandLink>
</div>
</div>
</f:facet>
<s:div rendered="#{testStepResult.getResponseContent() != null}" style="overflow: auto">
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Timestamp</ui:define>
<h:outputText value="#{testStepResult.getResponseTimestamp()}"/>
</s:decorate>
<h:outputText value="#{testStepResult.getRequestContent()}" escape="false"/>
</s:div>
<h:outputText value="#{testStepResult.getResponseContent()}"
escape="false"/>
</s:div>
<rich:panel styleClass="gzl-alert gzl-alert-yellow"
rendered="#{testStepResult.getRequestContent() == null}">
<span class="gzl-icon-exclamation-triangle"/>
<h:outputText
value="No request found"/>
</rich:panel>
</gri:panel>
<rich:panel styleClass="gzl-alert gzl-alert-yellow"
rendered="#{testStepResult.getResponseContent() == null}">
<span class="gzl-icon-exclamation-triangle"/>
<h:outputText
value="No response found"/>
</rich:panel>
</gri:panel>
</gri:panel>
</div>
</c:forEach>
<div id="logs">
<gri:panel>
<f:facet name="header">
<div class="row">
<div class="col-md-6">
<h:outputText value="Response"/>
<h:commandLink action="#{testStepResult.downloadResponse()}"
rendered="#{testStepResult.getResponseContent() != null}">
<s:span title="Download file" styleClass="gzl-icon-download text-info"/>
</h:commandLink>
</div>
<div class="col-md-6" style="text-align:right">
<h:outputText
value="#{testStepResult.getRequestValidation().validationStatus}"
styleClass="gzl-label #{testStepResult.getResponseValidation().validationStatus}"
rendered="#{testStepResult.getRequestValidation() != null}"/>
<h:commandLink actionListener="#{testStepResult.validateResponse()}"
rendered="#{testStepResult.getRequestValidation() == null}"
target="_blank">
<s:span title="Validate request" styleClass="gzl-icon-play-blue"/>
</h:commandLink>
<h:commandLink actionListener="#{testStepResult.validateResponse()}"
target="_blank"
rendered="#{testStepResult.getRequestValidation() != null}">
<s:span title="Re-validate" styleClass="gzl-icon-repeat"/>
</h:commandLink>
<h:outputLink value="#{testStepResult.getResponseValidation().permanentLink}"
target="_blank">
<s:span title="Validation result" styleClass="gzl-icon-link"/>
</h:outputLink>
</div>
</div>
<h:outputText value="Logs"/>
</f:facet>
<s:div rendered="#{testStepResult.getResponseContent() != null}">
<s:decorate template="/layout/display/_display.xhtml">
<ui:define name="label">Timestamp</ui:define>
<h:outputText value="#{testStepResult.getResponseTimestamp()}"/>
</s:decorate>