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
Is your feature request related to a problem? Please describe.
Test cases that involve side effects (e.g. DB updates) would benefit from a way to produce randomness that can be referenced in later tests.
For example, an operation that gets a record from something should be preceded by an operation that inserts or updates that record. The record should include something generated so both tests can reasonably assert they are testing the same record.
Propose a solution
Include a static or variables liquid JSON block in test cases, and expose that in ctx so the same actual values can be referenced in test-case templates.
This, combined with additional RNG-based filters or functions in the liquid templates would go a long way to producing data in tests.
Describe alternatives you've considered
RNG-based filters alone would satisfy a lot of the need, but we've wanted a generic bucket of referencable values a few times now. It would be less error-prone and allow for more intuitive reuse (set one value and reuse it in tests and assertions, vs generate X values from the same constituent pieces and assert they are all the same)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Test cases that involve side effects (e.g. DB updates) would benefit from a way to produce randomness that can be referenced in later tests.
For example, an operation that gets a record from something should be preceded by an operation that inserts or updates that record. The record should include something generated so both tests can reasonably assert they are testing the same record.
Propose a solution
Include a
static
orvariables
liquid JSON block in test cases, and expose that inctx
so the same actual values can be referenced in test-case templates.This, combined with additional RNG-based filters or functions in the liquid templates would go a long way to producing data in tests.
Describe alternatives you've considered
RNG-based filters alone would satisfy a lot of the need, but we've wanted a generic bucket of referencable values a few times now. It would be less error-prone and allow for more intuitive reuse (set one value and reuse it in tests and assertions, vs generate X values from the same constituent pieces and assert they are all the same)
The text was updated successfully, but these errors were encountered: