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

Unit test passes if there is no data in the unit test input table #12

Closed milesgawthorp closed 7 years ago

milesgawthorp commented 7 years ago

To replicate: Create a unit_test_input table in your database, but do not add any values. Create a unit_test_output table in your database and populate with your golden data. Associate these with the first and last steps of your transformation. Enable the Unit Test and Run

Actual result: The unit test runs successfully and logs 'Test passed succesfully against unit test' -- successfully has 2 s.

Expected results: The unit test to fail as no comparison is being made.

cdeptula commented 7 years ago

+1 If a step with a golden data set receives 0 rows, the unit test passes instead of failing with an incorrect number of rows error. This could be for any reason including an upstream hop being disabled, or an upstream step being disabled.

mattcasters commented 7 years ago

Confirmed the issue

mattcasters commented 7 years ago

I added a warning message and made sure the situation fails now: "WARNING: no test results found for step 'Output' : check disabled hops, input and so on."