1 package org
.argeo
.slc
.runtime
.test
;
5 import org
.argeo
.slc
.deploy
.DeployedSystem
;
6 import org
.argeo
.slc
.test
.ExecutableTestRun
;
7 import org
.argeo
.slc
.test
.TestData
;
8 import org
.argeo
.slc
.test
.TestDefinition
;
9 import org
.argeo
.slc
.test
.TestResult
;
10 import org
.argeo
.slc
.test
.WritableTestRun
;
13 * A basic bean implementation of a <code>WritableTestRun</code>, holding
14 * references to the various parts of a test run.
16 public class SimpleTestRun
implements WritableTestRun
, ExecutableTestRun
{
19 // private String slcExecutionUuid;
20 // private String slcExecutionStepUuid;
22 private DeployedSystem deployedSystem
;
23 private TestData testData
;
24 private TestDefinition testDefinition
;
25 private TestResult testResult
;
27 /** Executes the underlying test definition. */
29 uuid
= UUID
.randomUUID().toString();
30 if (testResult
!= null)
31 testResult
.notifyTestRun(this);
33 testDefinition
.execute(this);
36 @SuppressWarnings("unchecked")
37 public <T
extends DeployedSystem
> T
getDeployedSystem() {
38 return (T
) deployedSystem
;
41 public void setDeployedSystem(DeployedSystem deployedSystem
) {
42 this.deployedSystem
= deployedSystem
;
45 @SuppressWarnings("unchecked")
46 public <T
extends TestData
> T
getTestData() {
50 public void setTestData(TestData testData
) {
51 this.testData
= testData
;
54 @SuppressWarnings("unchecked")
55 public <T
extends TestDefinition
> T
getTestDefinition() {
56 return (T
) testDefinition
;
59 public void setTestDefinition(TestDefinition testDefinition
) {
60 this.testDefinition
= testDefinition
;
63 @SuppressWarnings("unchecked")
64 public <T
extends TestResult
> T
getTestResult() {
65 return (T
) testResult
;
68 public void setTestResult(TestResult testResult
) {
69 this.testResult
= testResult
;
72 public String
getUuid() {
76 public void setUuid(String uuid
) {
80 // public String getSlcExecutionUuid() {
81 // return slcExecutionUuid;
84 // public void setSlcExecutionUuid(String slcExecutionUuid) {
85 // this.slcExecutionUuid = slcExecutionUuid;
88 // public String getSlcExecutionStepUuid() {
89 // return slcExecutionStepUuid;
92 // public void setSlcExecutionStepUuid(String slcExecutionStepUuid) {
93 // this.slcExecutionStepUuid = slcExecutionStepUuid;