Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestresultSummaryBP.java12
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/IParameterDetailsPO.java8
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/ITestResultAdditionPO.java10
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/ParameterDetailsPO.java19
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/TestResultAdditionPO.java21
-rw-r--r--org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/persistence/TestResultPM.java2
6 files changed, 68 insertions, 4 deletions
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestresultSummaryBP.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestresultSummaryBP.java
index 4726c5b34..9429dcf49 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestresultSummaryBP.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestresultSummaryBP.java
@@ -39,6 +39,7 @@ import org.eclipse.jubula.client.core.model.IProjectPO;
import org.eclipse.jubula.client.core.model.IProjectPropertiesPO;
import org.eclipse.jubula.client.core.model.ITestCasePO;
import org.eclipse.jubula.client.core.model.ITestJobPO;
+import org.eclipse.jubula.client.core.model.ITestResultAdditionPO;
import org.eclipse.jubula.client.core.model.ITestResultPO;
import org.eclipse.jubula.client.core.model.ITestResultSummaryPO;
import org.eclipse.jubula.client.core.model.ITestResultSummaryPO.AlmReportStatus;
@@ -256,10 +257,10 @@ public class TestresultSummaryBP {
int nodeSequence = startingNodeSequence;
TestResultNode resultNode = result;
ITestResultPO keyword = PoMaker.createTestResultPO();
+ keyword.setInternalTestResultSummaryID(summaryId);
fillNode(keyword, resultNode);
keyword.setKeywordLevel(nodeLevel);
keyword.setKeywordSequence(nodeSequence);
- keyword.setInternalTestResultSummaryID(summaryId);
keyword.setInternalParentKeywordID(m_parentKeyWordId);
sess.persist(keyword);
for (TestResultNode node : resultNode.getResultNodeList()) {
@@ -313,8 +314,11 @@ public class TestresultSummaryBP {
cap.getActionName()));
String commandlog = resultNode.getCommandLog();
if (StringUtils.isNotBlank(commandlog)) {
- keyword.addAdditon(
- NodeMaker.createTestResultAddtionPO(commandlog));
+ ITestResultAdditionPO testResultAddition =
+ NodeMaker.createTestResultAddtionPO(commandlog);
+ testResultAddition.setInternalTestResultSummaryID(
+ keyword.getInternalTestResultSummaryID());
+ keyword.addAdditon(testResultAddition);
}
//add screenshot if exists
@@ -359,6 +363,8 @@ public class TestresultSummaryBP {
IParameterDetailsPO parameter = PoMaker.createParameterDetailsPO();
parameter.setParameterName(param.getName());
parameter.setParameterType(param.getType());
+ parameter.setInternalTestResultSummaryID(
+ keyword.getInternalTestResultSummaryID());
String value = param.getValue();
if (value.length() >= 3500) {
log.warn("Parameter value to long: " + value); //$NON-NLS-1$
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/IParameterDetailsPO.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/IParameterDetailsPO.java
index a90919d5a..fb995913a 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/IParameterDetailsPO.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/IParameterDetailsPO.java
@@ -74,7 +74,15 @@ public interface IParameterDetailsPO {
*/
public abstract void setParameterValue(String parameterValue);
+ /**
+ * @return the test result Summary ID
+ */
+ public Long getInternalTestResultSummaryID();
+ /**
+ * @param testResultSummaryId the test result Summary ID
+ */
+ public void setInternalTestResultSummaryID(Long testResultSummaryId);
/**
* Checks the equality of the given Object with this Object.
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/ITestResultAdditionPO.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/ITestResultAdditionPO.java
index 8f7e5bff4..f9f52fbd3 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/ITestResultAdditionPO.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/ITestResultAdditionPO.java
@@ -42,4 +42,14 @@ public interface ITestResultAdditionPO {
* @return the type for the saved object
*/
public TYPE getType();
+
+ /**
+ * @return the m_testResultSummaryId
+ */
+ public Long getInternalTestResultSummaryID();
+
+ /**
+ * @param testResultSummaryId the testResultSummaryId to set
+ */
+ public void setInternalTestResultSummaryID(Long testResultSummaryId);
}
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/ParameterDetailsPO.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/ParameterDetailsPO.java
index a180e1762..788f295bf 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/ParameterDetailsPO.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/ParameterDetailsPO.java
@@ -48,6 +48,8 @@ public class ParameterDetailsPO implements IParameterDetailsPO {
/** parameter value */
private String m_parameterValue;
+ /** summary id*/
+ private long m_testResultSummaryId;
/**
* only for Persistence (JPA / EclipseLink)
@@ -168,6 +170,23 @@ public class ParameterDetailsPO implements IParameterDetailsPO {
public void setParameterValue(String parameterValue) {
m_parameterValue = parameterValue;
}
+
+ /**
+ * @return the m_testResultSummaryId
+ */
+ @Basic
+ @Column(name = "INTERNAL_TESTRUN_ID")
+ @Index(name = "PI_TESTRUN_ID")
+ public Long getInternalTestResultSummaryID() {
+ return m_testResultSummaryId;
+ }
+
+ /**
+ * @param testResultSummaryId the testResultSummaryId to set
+ */
+ public void setInternalTestResultSummaryID(Long testResultSummaryId) {
+ m_testResultSummaryId = testResultSummaryId;
+ }
/**
* {@inheritDoc}
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/TestResultAdditionPO.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/TestResultAdditionPO.java
index b8be9553a..e57c93ee9 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/TestResultAdditionPO.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/model/TestResultAdditionPO.java
@@ -24,6 +24,7 @@ import javax.persistence.Table;
import javax.persistence.Transient;
import org.apache.commons.lang.SerializationUtils;
+import org.eclipse.persistence.annotations.Index;
/**
*
@@ -40,6 +41,9 @@ class TestResultAdditionPO implements ITestResultAdditionPO {
private ITestResultAdditionPO.TYPE m_type;
/** data */
private byte[] m_data;
+ /** testresult summary id*/
+ private Long m_testResultSummaryId;
+
/**
* only for Persistence (JPA / EclipseLink)
@@ -134,4 +138,21 @@ class TestResultAdditionPO implements ITestResultAdditionPO {
this.m_type = type;
}
+ /**
+ * @return the m_testResultSummaryId
+ */
+ @Basic
+ @Column(name = "INTERNAL_TESTRUN_ID")
+ @Index(name = "PI_TESTRUN_ID")
+ public Long getInternalTestResultSummaryID() {
+ return m_testResultSummaryId;
+ }
+
+ /**
+ * @param testResultSummaryId the testResultSummaryId to set
+ */
+ public void setInternalTestResultSummaryID(Long testResultSummaryId) {
+ m_testResultSummaryId = testResultSummaryId;
+ }
+
}
diff --git a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/persistence/TestResultPM.java b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/persistence/TestResultPM.java
index 77488f655..816dd5248 100644
--- a/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/persistence/TestResultPM.java
+++ b/org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/persistence/TestResultPM.java
@@ -173,7 +173,7 @@ public class TestResultPM {
//delete parameter details of test results
String paramQueryBaseString =
"delete from PARAMETER_DETAILS"; //$NON-NLS-1$
- String queryExtension = " where FK_TESTRESULT in (select ID from TESTRESULT where INTERNAL_TESTRUN_ID = #summaryId)"; //$NON-NLS-1$
+ String queryExtension = " where INTERNAL_TESTRUN_ID = #summaryId"; //$NON-NLS-1$
if (isDeleteAll) {
session.createNativeQuery(paramQueryBaseString).executeUpdate();
} else {

Back to the top