mattcasters / pentaho-pdi-dataset

Set of PDI plugins to more easily work with data sets. We also want to provide unit testing capabilities through input data sets and golden data sets.
Apache License 2.0
30 stars 13 forks source link

Do variables defined in the Unit Test get injected into the transformation? #60

Open Jae32 opened 4 years ago

Jae32 commented 4 years ago

If so I can't get them to work. I have the variables (in this case for a table) defined in an identical way if doing it through run options but if I execute the transformation directly with the test active then the variable is null taking the blank field from run options over the defined variable in the test.

Then if I execute the test via the execute all tests the variable isn't even acknowledged and just remains as ${v_table} in the script.

It exists in the xml for the test under variables;

<child>
         <id>variableValues</id>
         <value>org.pentaho.di.dataset.VariableValue</value>
         <type>String</type>
         <children>
            <child>
               <id>0</id>
               <value></value>
               <type>String</type>
               <children>
                  <child>
                     <id>value</id>
                     <value>sometable</value>
                     <type>String</type>
                  </child>
                  <child>
                     <id>key</id>
                     <value>v_table</value>
                     <type>String</type>
                  </child>
               </children>
            </child>
            <child>
               <id>1</id>
               <value></value>
               <type>String</type>
               <children>
                  <child>
                     <id>value</id>
                     <value>somevalue</value>
                     <type>String</type>
                  </child>
                  <child>
                     <id>key</id>
                     <value>variable2</value>
                     <type>String</type>
                  </child>
               </children>
            </child>
         </children>
      </child>

Is there something I am doing wrong or is this a bug?