Dynamic Variables

Dynamic variables are SnapTest's way to add variables "on-the-fly" while a test is running. They exist because sometimes it's required to pull in some data that hasn't been generated before test runs.

Dynamic variables can only be obtained from a DOM element because extensions do not have access to the tested applications Javascript runtime.

Common use cases:

  1. While testing a store checkout, sometimes the tax or total's can be unpredictable. Store the tax amount from a UI element during a quote/preview screen, and assert that the confirmation page has the same tax amount displayed.

  2. Dates and times that are randomly or unpredictably assigned can be confirmed by storing the text into a dynamic variable.

Group 6Record it…Play it…Generate it…GeneratorsSelector AlgorithmsPrivate modeTest organizationTeamsWorkspacesDedicated supportTest data storageDebugger toolsAdaptable TestsCLI tools and APIWhite-labeled codeVariablesMulti-test playbackManual testsComponents