v0.3.0
New features
Support treating otherwise unparsable cells in your parameters table as strings
This is a quality of life improvement for avoiding needing to add noise to string cells:
param_test "supports unquoted strings",
"""
| value | unquoted string |
| 1, 2, 3 | The value is 1 |
""",
%{value: value, "unquoted string": unquoted} do
assert value == "1, 2, 3" and unquoted == "The value is 1"
end
Support a "description" column that will provide a custom name for each test.
If you supply a column named description
, test_description
, or test_desc
, we'll use that in the test name rather than simply dumping the values from the row in the test table. This lets you provide more human-friendly descriptions of why the test uses the values it does.
A trivial example (which also takes advantage of the support for unquoted strings):
param_test "failing test",
"""
| value | description |
| 1 | The value is 1 |
""",
%{value: value} do
assert value == 2
end
When you run this, the error will include the description ("The value is 1") in the test name:
1) test failing test - The value is 1 (MyAppTest)
test/my_app_test.exs:8
Assertion with == failed
code: assert value == 2
left: 1
right: 2
stacktrace:
test/my_app_test.exs:14: (test)
This is useful for communication with stakeholders, or for understanding what went wrong when a test fails.