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
As of today a test function decorated with @case_data is a great way to perform the data retrieval inside the test function body: that way, if a single dataset fails to be retrieved, we do not fail the whole test suite.
However the fact that data retrieval is done inside the test function body might be a concern if test duration is monitored: the time spend to retrieve and/or parse each dataset is not "test duration" per se. Besides if users put some caching in place on their case functions, the first test's duration will be different from subsequent tests'.
For all those reasons it might be a better choice to allow users to create "case fixtures". They would work exactly the same way as current decorator (same arguments to specify where the cases are located and how to filter them).
Documentation would need to be improved then.
The text was updated successfully, but these errors were encountered:
As of today a test function decorated with
@case_data
is a great way to perform the data retrieval inside the test function body: that way, if a single dataset fails to be retrieved, we do not fail the whole test suite.However the fact that data retrieval is done inside the test function body might be a concern if test duration is monitored: the time spend to retrieve and/or parse each dataset is not "test duration" per se. Besides if users put some caching in place on their case functions, the first test's duration will be different from subsequent tests'.
For all those reasons it might be a better choice to allow users to create "case fixtures". They would work exactly the same way as current decorator (same arguments to specify where the cases are located and how to filter them).
Documentation would need to be improved then.
The text was updated successfully, but these errors were encountered: