Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


While we don’t recommend using Expected Results as Parameters, the approach can have merits. This article will explore options & tradeoffs.

We generally suggest drawing a line between system inputs & expected outcomes, and then handling the latter ones in the scripts or even after export.

That approach would be preferable in the majority of situations, and you are likely well aware of how the data-driven Expected Results in Manual scripts facilitate it. However, there are a couple of alternatives to keep in mind.

However, using Expected Results as Parameters can have merits. This article will explore options & tradeoffs.


Table of Contents

TCD Automate

If you are scripting in Automate, there are two primary ways to address the difference in outcomes: 1) conditional steps and 2) subsetting.

...

Within each block, you have the flexibility to write a completely different script if necessary. Depending on the overall length, you may consider putting each block on a separate tab in Automate and placing the subsetting {} value in the Background section.

...


Info
For the avoidance of doubt, these two methods are not limited to ”Then” statements and can be used for any steps.

Forced Interactions

Another feature is the internal variable (at the bottom of the dropdown list) which comes from the Forced Interactions tab. First, you can specify the conditions (even one).

...

  • For complex dependencies, extra intervention in the algorithm could reduce the efficiency and unnecessarily increase the number of scenarios.
  • If the whole column is not populated, the script will get the value “No expected outcome” for blanks, which a) could cause confusion; b) would need to be treated as “skip the step” by the automation framework.
    • You could side-step this challenge with the freeze/reimport combination.
  • This does not support differences in multiple steps, only in 1 line.

Expected Results as Parameters


Finally, let’s talk about why & how we can deviate from the training recommendation.

...

The downsides are the potential complexity of constraints and the “cluttered” artifacts like Mind Map and Parameter/Scenarios tables. As you probably guessed, this approach would struggle with dependencies across 3 or more “actual” parameters.

Some of the challenge can again be mitigated using the freeze/reimport combination.


How

Step 1: Add a parameter with the possible outcomes as values

...

Step 3: Reference the parameter in the script

Side note:



Info

1)

...

The same approach can be also used for any kind of conversion testing when input A1 enters the system and is supposed to be transformed into B1.

2) This works in Manual scripting too

...

.