Problem to solve: We'd like to automatically include Expected Results into our test scripts

In the tests shown above for example, we might want to include this Expected Result every time the necessary Values appear together in a test case:

1) When a customer attempts to use frequent flier miles to pay for a flight and that customer has enough miles to do so, confirm that the transaction is successfully processed and that the customer's frequent flier balance is debited.

In the Scripts -> Manual Auto-Scripts screen, find the specific test step you want to add your Expected Result to and highlight it

1) Navigate to the Manual Auto-Scripts screen.

2) Hover over the Step that you want the Expected Result to appear with.

3) Click on "Add Expected Results."

Ask yourself these 3 questions and formulate precise answers:

1) What Expected Result(s) will be triggered?  

  • In this case, the Expected Result is "the transaction is successfully processed and the customer's frequent flier balance is debited."

    Note: Some new users of Hexawise attempt to enter Expected Results into the "Parameters" screen; we often recommend avoiding that. Instead, keep Values (necessary to trigger Expected Results) separate from the Expected Results themselves.

2) What is the smallest number of Values that will result in the Expected Result triggering?

  • Exactly two Values are necessary to trigger the Expected Result here.  One is insufficient, and we don't need three.  

3) Which specific Values will need to appear in the same test case for the Expected Result to occur?

  • First, the Parameter "Type of Payment" = "frequent flier points"

  • Second, the awkwardly named Parameter "Customer Has Enough Frequent Flier Miles to Pay for Flight" = "has enough frequent flier miles to purchase this flight with them."

Next, with the answers to those 3 questions fresh in your mind, enter ONLY the specific Values that are needed to trigger the Expected Result

You're setting up a simple "when / then" rule here.

Note that you're not restricted to rules like when "Type of Payment" IS frequent flier points:

  • In this example, you could also create a rule that reads "IS NOT" "frequent flier points." (click on "is" between dropdowns to switch the rule type)

  • Alternatively, you could create a rule that says when "Type of Payment" is "ANY," then...

Finish creating your simple "When / Then" rule (1) and save it (2).

Rinse and repeat for adding your other Expected Results rules.

That's it! All your tests will now include the Expected Results you defined where applicable.

You'll notice that the Values responsible for triggering each Expected Result are bolded.

Important Usage Tips and things to know about the Expected Results feature:

1) This feature is a partial solution for straightforward Expected Results. It primarily exists so that you won't have to manually type many, simple expected results. It is not designed to handle especially complex rules that you might have.

2) Be sure you understand the similarities & differences between Hexawise's Expected Results in the Auto-scripts screen, and Expected Outcomes in the "Forced Interactions" feature. There is a big, yet subtle, difference:

  • Expected Result in Manual Auto-Scripts takes the scenario data table as "read only" precondition and generates the "Then" content ONLY IF the conditions are satisfied (i.e. "reactive approach").

    Expected Outcome in Forced Interactions guarantees that the test conditions to satisfy it will be included in the Scenarios table at least once (i.e. "proactive approach", which may cause the increase in the number of test cases).

  • If you want to define an Expected Result that requires 3 or more specific Values to appear in a single test script (and you're creating pairwise sets of tests), use the "Forced Interactions" feature or higher algorithm strength to guarantee the scenario is included in your suite. Then use the Manual Auto-Scripts feature to document the Expected Result for export.

    Hexawise Automate can leverage that last column on Forced Interactions directly as an internal variable.

    If you want to define an Expected Result that requires 2 or fewer specific Values to appear in a single test script (and you're creating pairwise sets of tests), use the Manual Auto-Scripts feature without additional prep work.



Did this answer your question?