Filter the test-cases
This action lets you remove some rows from your test-cases based on conditions.
Filter based on the value of a column
It's possible to filter the test cases and only keep the test-cases with the expected values. It will save you to define multiple files with similar test-cases.
To filter a set of test-cases, you must use specify the column on which you'll execute your filter and the operator (equal or like). You can also apply a negation to your operator to revert its result.
case filter on column 'dimension' values like 'first-%' ;
case filter on column 'dimension' values not equal 'foo' ;
Filter on empty and none values
Since version 1.9
, you can also filter on two specific values: empty and none. The specific value empty is useful to filter a value with a length of 0 character. The specific value none lets you filter when no value has been provided to some cells of
the set of test-cases. The difference between empty and none is important when using the grouping option.
To achieve this kind of filter, just provide the value empty
without the quotes surrounding usual values.
case filter on column 'dimension' values not equal none ;
case filter on column 'dimension' values equal empty ;
Usage of the operator like is tolerated but not really relevant and the behavior of genbiL will be exactly the same than with an equal.
Filter on multiple values
Since version 1.8
, you can apply an 'or
' condition in your filter expression by supplying multiples values. The expression
values equal '1', '2'
will return all the rows where the specified column has a value of '1' or '2'. By extension, the expression
values not equal '1', '2'
will return all the rows where the specified column hasn't a value of '1' and neither '2'.
case filter on column 'dimension' values like 'first-%', '%bar' ;
case filter on column 'dimension' values not equal 'foo', 'bar' ;
Since version 1.7
, genbiL lets you the opportunity to filter in the goal to only keep distinct resulting rows. This is especially useful when building large tests-suites and will probably save you time when creating the CSV for such tests.