You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, testing the same code on different datasets is useful. For large datasets, writing a single test for each item in the dataset is exhausting and cumbersome.
Currently, the only smart way to do this is to write a single test, that iterates over an array of test cases:
The problem with this approach is that the new assertion styles do not let you add a custom error message, resulting in error messages that do not tell you which testCase failed. Currently, the only option available is to use the legacy-style assertion assert_equal_with_message.
Adding custom error messages support to the new assertion style would fix this particular issue, but I feel like properly handling parameterized tests would be the better approach. What do you think?
The text was updated successfully, but these errors were encountered:
That's a really relevant scenario! It gives me a few ideas that I'd like to ponder for a while. If you have any more concrete ideas from your particular usecase on how to support that, please add them here.
Sometimes, testing the same code on different datasets is useful. For large datasets, writing a single test for each item in the dataset is exhausting and cumbersome.
Currently, the only smart way to do this is to write a single test, that iterates over an array of test cases:
The problem with this approach is that the new assertion styles do not let you add a custom error message, resulting in error messages that do not tell you which testCase failed. Currently, the only option available is to use the legacy-style assertion
assert_equal_with_message
.Adding custom error messages support to the new assertion style would fix this particular issue, but I feel like properly handling parameterized tests would be the better approach. What do you think?
The text was updated successfully, but these errors were encountered: