A step in a Scenario can return information as output parameters. Within one test case, the way to consume such an output in a later step is a Linked Parameter; see Configuring Parameter Sources in a Scenario.
A Linked Parameter is scoped to the currently running test case. When you run multiple test cases in a Job and an output from one test case is needed in another, store it in a Run Property instead. Run Properties are shared across the test cases of a Job, which makes them the vehicle for cross-test-case data flow. See Run Properties for the concept.
Passing a value from one test case to another
- In the first Scenario, click the output parameter whose value should be available to other test cases.
- Store the output parameter to a Run Property, creating the property if needed.
- In the Scenario that consumes the value, configure the relevant input parameter with the source Run Property, selecting the property from step 2. You can do this from the Input Parameter Configuration panel or the Parameter Configuration dialog.
- Run both as part of the same Job, ordered so the producer executes before the consumer.
Note on execution order: cross-test-case flow depends on the producing test case completing before the consuming one starts. Use a static Suite with explicit ordering; parallel execution does not guarantee order.
Choosing the right mechanism
- Same test case, step to step: Linked Parameter. Direct, visible in the business process view.
- Different test cases in one Job: output parameter stored to a Run Property, consumed as a Run Property source.
- Larger or structured data: see Data Map for shared storage with test-case and global scopes.
Comments
0 comments
Please sign in to leave a comment.