Memory variables in Drizz allow tests to store, reuse, and validate dynamic values such as OTPs, IDs, prices, and references generated during execution. Proper memory management ensures accuracy across steps, eliminates hardcoding, and supports data-driven flows. This section outlines best practices to maintain clarity, prevent variable conflicts, and ensure predictable behavior throughout the test.
Recommended Best Practices for Writing Memory Commands:
Use clear, descriptive variable names
Example: otp_details, order_id, ref_code
Validate stored values when critical to the flow
Example: Validating the order ID on the success screen.
Use memory for all dynamic values
Prevents hardcoding and increases test reliability.
Avoid overwriting the same variable unintentionally
Use new variable names when storing different values throughout the test.