Run Pipeline Unit Tests doesn't initialize parameters
package org.apache.hop.testing.util;
import org.apache.commons.lang.StringUtils;
+import org.apache.hop.core.Const;
import org.apache.hop.core.Result;
import org.apache.hop.core.exception.HopException;
import org.apache.hop.core.logging.ILoggingObject;
@@ -85,6 +86,15 @@ public class UnitTestUtil {
testPipeline.setLogLevel(logLevel);
testPipeline.setMetadataProvider(metadataProvider);
+ // Set parameter values based on parent values (if any)
+ //
+ testPipeline.copyParametersFromDefinitions(testPipelineMeta);
+ for (String parameterName : testPipelineMeta.listParameters()) {
+ String parameterValue = variables.getVariable(parameterName);
+ testPipeline.setParameterValue(parameterName, parameterValue);
+ }
+ testPipeline.activateParameters(testPipeline);
+
// Don't show to unit tests results dialog in case of errors
//
testPipeline.setVariable(DataSetConst.VAR_DO_NOT_SHOW_UNIT_TEST_ERRORS, "Y");
