]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.core/src/main/java/org/argeo/slc/core/test/SimpleTestRun.java
New runtime working end to end
[gpl/argeo-slc.git] / org.argeo.slc.core / src / main / java / org / argeo / slc / core / test / SimpleTestRun.java
index 388e1f2dc69c25b227389dde6783a44b1e773fe6..bbe5b215cc332d5bfec88249552a4a56002738ac 100644 (file)
@@ -1,5 +1,7 @@
 package org.argeo.slc.core.test;\r
 \r
+import java.util.UUID;\r
+\r
 import org.argeo.slc.core.deploy.DeployedSystem;\r
 import org.argeo.slc.core.process.SlcExecution;\r
 import org.argeo.slc.core.process.SlcExecutionStep;\r
@@ -21,6 +23,7 @@ public class SimpleTestRun implements WritableTestRun, ExecutableTestRun {
 \r
        /** Executes the underlying test definition. */\r
        public void execute() {\r
+               uuid = UUID.randomUUID().toString();\r
                if (testResult != null)\r
                        testResult.notifyTestRun(this);\r
                testDefinition.execute(this);\r
@@ -83,10 +86,12 @@ public class SimpleTestRun implements WritableTestRun, ExecutableTestRun {
        }\r
 \r
        public void notifySlcExecution(SlcExecution slcExecution) {\r
-               slcExecutionUuid = slcExecution.getUuid();\r
-               SlcExecutionStep step = slcExecution.currentStep();\r
-               if (step != null) {\r
-                       slcExecutionStepUuid = step.getUuid();\r
+               if (slcExecution != null) {\r
+                       slcExecutionUuid = slcExecution.getUuid();\r
+                       SlcExecutionStep step = slcExecution.currentStep();\r
+                       if (step != null) {\r
+                               slcExecutionStepUuid = step.getUuid();\r
+                       }\r
                }\r
        }\r
 \r