Test case generation

Abstract test cases are immediately generated from the action-state model. In this way you can validate your requirements and your initial test cases as well. Remember that abstract test cases are shorter and more understandable. In addition , they are entirely implementation-independent. The generated abstract test cases of the model in ‘Automated test design’ is the following:

T1 valid Card – correct PIN:
insert valid Card
Card recognized
enter correct PIN
PIN accepted

T2 valid Card – incorrect PIN for less than 3 times – invalid PIN 3rd time:
insert valid Card
Card recognized
enter incorrect PIN
PIN refused
enter incorrect PIN third time
PIN refused, Card eaten

T3 invalid Card:
insert invalid Card
Card ejected

When you create the executable test steps (clauses), they are immediately compiled to test cases. T1 is compiled as:

T1 valid Card – correct PIN:
insert valid Card
WHEN insert card IS #pressed
Card recognized
THEN Message IS enter PIN
enter correct PIN
WHEN PIN IS goodPIN (7692)
WHEN Enter PIN IS #pressed
PIN accepted
THEN Message IS PIN accepted

The actual value of the good PIN is 7692. Obviously, it’s not an executable code. Harmony generates it with the necessary locators. The generated test code is the following.

EN.SelectWindow(“ATM PIN”);
EN.SetValue(“PIN”, “7692”);
EN.ClickOn(“Enter PIN”);
EN.VerifyValue(“Message”, “PIN accepted”);

When you modify a test step, the test case will be modified immediately, thus you can verify it promptly.

Back