Test case generation

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

@1a1 Validation that paying is not possible:

  • Customer adds articles so that ordering be possible
  • Customer deletes articles to go/remain under 10 euros
  • Validation that paying is not possible

@1b2a2 Customer readds articles to get free beverage:

  • Customer adds articles so that ordering be possible
  • Customer adds articles to get free beverage
  • Validation that both free beer and free coke can be selected
  • Customer selects a free beer
  • Validate free beer
  • Customer deletes articles to go below 30 euros
  • Validation that free beer is withdrawn
  • Customer readds articles to get free beverage

When you creating the acceptance criteria, they are immediately compiled to test cases. The test cases contain one category with a choice for each category declared. Thus, the generated test cases may contain more inputs and sometimes outputs than the acceptance criterion. This is a clear advantage as acceptance criteria remain more understandable containing only relevant data with respect to a given requirement. Otherwise the generated test case is similar to the acceptance criterion:

Successful:

WHEN Login name IS Smith
WHEN Password IS 2a4b6c
WHEN Next IS #pressed
THEN Msg IS Login successful!

Obviously, it’s not an executable code. Harmony generates it with the necessary locators. The generated test code is the following.

EN.SelectWindow(“Login”);
EN.SetValue(“Login name”, “Smith”);
EN.SetValue(“Password”, “2a4b6c”);
EN.ClickOn(“Next”);
EN.VerifyValue(“Msg”, “Login successful!”);

When you modify an acceptance criterion, the test case will be modified immediately, thus you can verify it promptly.

Back