1 package org
.argeo
.slc
.core
.test
;
3 import org
.argeo
.slc
.core
.deploy
.DeployedSystem
;
4 import org
.argeo
.slc
.core
.process
.SlcExecution
;
5 import org
.argeo
.slc
.core
.process
.SlcExecutionStep
;
8 * A basic bean implementation of a <code>WritableTestRun</code>, holding
9 * references to the various parts of a test run.
11 public class SimpleTestRun
implements WritableTestRun
, ExecutableTestRun
{
14 private String slcExecutionUuid
;
15 private String slcExecutionStepUuid
;
17 private DeployedSystem deployedSystem
;
18 private TestData testData
;
19 private TestDefinition testDefinition
;
20 private TestResult testResult
;
22 /** Executes the underlying test definition. */
23 public void execute() {
24 if (testResult
!= null)
25 testResult
.notifyTestRun(this);
26 testDefinition
.execute(this);
29 public <T
extends DeployedSystem
> T
getDeployedSystem() {
30 return (T
) deployedSystem
;
33 public void setDeployedSystem(DeployedSystem deployedSystem
) {
34 this.deployedSystem
= deployedSystem
;
37 public <T
extends TestData
> T
getTestData() {
41 public void setTestData(TestData testData
) {
42 this.testData
= testData
;
45 public <T
extends TestDefinition
> T
getTestDefinition() {
46 return (T
) testDefinition
;
49 public void setTestDefinition(TestDefinition testDefinition
) {
50 this.testDefinition
= testDefinition
;
53 public <T
extends TestResult
> T
getTestResult() {
54 return (T
) testResult
;
57 public void setTestResult(TestResult testResult
) {
58 this.testResult
= testResult
;
61 public String
getUuid() {
65 public void setUuid(String uuid
) {
69 public String
getSlcExecutionUuid() {
70 return slcExecutionUuid
;
73 public void setSlcExecutionUuid(String slcExecutionUuid
) {
74 this.slcExecutionUuid
= slcExecutionUuid
;
77 public String
getSlcExecutionStepUuid() {
78 return slcExecutionStepUuid
;
81 public void setSlcExecutionStepUuid(String slcExecutionStepUuid
) {
82 this.slcExecutionStepUuid
= slcExecutionStepUuid
;
85 public void notifySlcExecution(SlcExecution slcExecution
) {
86 slcExecutionUuid
= slcExecution
.getUuid();
87 SlcExecutionStep step
= slcExecution
.currentStep();
89 slcExecutionStepUuid
= step
.getUuid();