Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support reproducible randomness in wick test cases #383

Open
jsoverson opened this issue Jul 21, 2023 · 0 comments
Open

Support reproducible randomness in wick test cases #383

jsoverson opened this issue Jul 21, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jsoverson
Copy link
Contributor

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)

@jsoverson jsoverson added enhancement New feature or request triage To be triaged labels Jul 21, 2023
@jsoverson jsoverson removed the triage To be triaged label Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant