Commit 4cf3e58b authored by Guillaume Thomazon's avatar Guillaume Thomazon
Browse files
parent 13f7990f
......@@ -61,6 +61,9 @@ public class Execution implements Serializable {
@JoinColumn(name = "execution")
private TestInstanceResult testInstanceResult;
@Transient
private String testComponentToString;
public Execution() {
super();
}
......@@ -143,6 +146,10 @@ public class Execution implements Serializable {
this.company = company;
}
public void setTestComponentToString(String testComponentToString) {
this.testComponentToString = testComponentToString;
}
public String getGlobalStatus() {
for (GwtTestStepResult testStepResult : testStepResults) {
if (testStepResult.getStatus().equals("FAILED")) {
......@@ -154,11 +161,11 @@ public class Execution implements Serializable {
public String getTestComponentToString() {
if (testComponent instanceof GwtTestSuite) {
return testComponent.getLabel();
setTestComponentToString(testComponent.getLabel());
} else if (testComponent instanceof GwtTestCase) {
return ((GwtTestCase) testComponent).getTestSuite().getLabel() + " > " + testComponent.getLabel();
setTestComponentToString(((GwtTestCase) testComponent).getTestSuite().getLabel() + " > " + testComponent.getLabel());
}
return null;
return testComponentToString;
}
public String reRun() {
......@@ -169,14 +176,24 @@ public class Execution implements Serializable {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Execution execution = (Execution) o;
if (!id.equals(execution.id)) return false;
if (!launchBy.equals(execution.launchBy)) return false;
if (!launchDate.equals(execution.launchDate)) return false;
if (!id.equals(execution.id)) {
return false;
}
if (!launchBy.equals(execution.launchBy)) {
return false;
}
if (!launchDate.equals(execution.launchDate)) {
return false;
}
return testStepResults.equals(execution.testStepResults);
}
......
......@@ -68,15 +68,15 @@
#{execution.id}
</h:outputLink>
</g:column>
<g:column sortBy="#{'soapuiProject'}" filterBy="#{'soapuiProject'}">
<g:column sortBy="#{'soapuiProject.label'}" filterBy="#{'soapuiProject'}">
<ui:define name="header">Project</ui:define>
<h:outputText value="#{execution.soapuiProject.label}"/>
</g:column>
<g:column sortBy="#{'testInstanceResult'}" filterBy="#{'testInstanceResult'}">
<g:column sortBy="#{'testInstanceResult.testInstance'}" filterBy="#{'testInstanceResult'}">
<ui:define name="header">Test Instance</ui:define>
<h:outputText value="#{execution.testInstanceResult.testInstance}"/>
</g:column>
<g:column sortBy="#{'testComponent'}" filterBy="#{'testComponent'}">
<g:column>
<ui:define name="header">Component executed</ui:define>
<h:outputText value="#{execution.getTestComponentToString()}"/>
</g:column>
......
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