Test design automation

In this chapter, we will explore the test design phase of Harmony and how it helps users design tests using a model-based approach.
What is Test Design?
Test design is the process of creating a plan or model for testing a system or application. In Harmony, test design involves creating a model of the test by defining high-level steps, actions, responses, and states required for the testing process.
Test Design Automation with Model-Based Testing
In Harmony, test design is automated using model-based testing. This means that the user creates a model of the tests before automating them. The model consists of high-level steps, each containing an action, 0, 1, or more responses, and potentially a state.
Benefits of Designing the Tests First
Designing tests before automating them has many benefits.
It helps to identify potential issues early on,
saves time and resources, and
ensures that the tests are efficient and effective.
Item Types
In Harmony, there are three types of items that can be added to the test design tree: steps, preconditions, and labels.
A step is a high-level action or task that needs to be performed during the testing process. It consists of a human-readable action and one or more human-readable responses. A step can also include a state, i.e., what state the application is in after the step.
Preconditions - prescribed states
A precondition specifies that a test must start in a specific state. For example, a precondition can specify that a test must start on a specific page or with a certain set of data. Preconditions are actually states.
A label is a way to organize the test design tree by grouping steps together.
Editing the Test Design
Harmony provides various tools to help users edit and organize the test design tree.
Indenting and Unindenting
Users can indent or unindent steps to create a hierarchy by selecting a step and pressing the “Tab” or “Shift+Tab” key, respectively.
Creating Forks
Users can create forks in the test design tree to create two different branches in the test. To create a fork, select a step and click the “Create Fork” button.
Ending the Test in a Branch
Users can end a test in a branch by selecting a step and clicking the “End Test in This Branch” button.
By following these steps, users can create a clear and organized test design model that can be used to automate tests in the next phase.
Model elements and graphHow to make modelsUse modeling by applying an exampleGenerating another model: statechartGenerating test cases