logo

How to make models

In order to make the modeling easier, the model is textual, but the result is a mixture of graph and text. The model has the following elements:

Before you start modeling

Please read Quick start from the beginning to ‘MODELING STARTS FROM HERE’, then press the link on 2.4. ‘Start building your test steps by clicking “Add Step.”’

Test/model step

Steps are considered as nodes in the model graph. Model steps are created as simple text where all steps start with an action. When the action is ready, you can press the right arrow to start a response. You can also select the right arrow icon:
Image without caption
When you finish a response, you can start a second one in the same way:
Image without caption
You can add more response if you want more validations that are not obvious. When all the responses are ready you can add a test state by clicking on the State icon:
Image without caption
When the step is ready you can start a step by pressing Enter:
Image without caption
If you click on the beginning of the action, then the new step will be created as a previous step:
Image without caption
Each element can be modified, by clicking on the element to be modified. Any element can be deleted, by first removing the text, then pressing Del or Backspace. An entire Step can be deleted from the menu (right mouse click at the action) :
Image without caption

Linear sequence

When finishing a step (Step 1), and you press Enter, the subsequent step (Step 2) will be the child of the previous one, and it is placed with the same indentation. Step 2 will be executed right after Step 1. On the left-hand side, the graph consists of two nodes for Step 1 and Step 2, respectively, and an edge connecting the two nodes:
Image without caption

Label

Labels connect requirements with models and test cases. The name of a test is constructed from the labels of the steps. Labels are important for separating a sub-model in a visible way. A label can be constructed by adding an action and entering ‘>’:
Image without caption
When you finish a label and press Enter, a new step starts with intending the step right:
Image without caption
You can also create a label from the menu:
Image without caption
More labels can be included in one test as a single test may cover more requirements. Suppose that a test covers two labels in the following way:
Image without caption

Fork

Let us assume that we want to add a step, but this step cannot be executed right after the previous one. In this case, these two steps will fork, and they will belong to different test cases.
Forking can be made by pressing a keyword shortcut Ctrl + f on the step to fork:
Before forking:
Image without caption
after pressing Ctrl + f
Image without caption
You can see that the edge between the nodes doesn’t exist anymore. However, this is not well understandable. Fortunately, labels help. If you extend the model with a label, then the fork will become understandable:
Image without caption
You can fork test steps by applying the menu, by pressing the right mouse button inside ‘second action’:
Image without caption
By selecting ‘Fork after’, the result is a fork starting from ‘second action’:
Image without caption
By selecting ‘Fork before’, the fork happens before ‘second action’:
Image without caption
You can also use ‘Alt + Enter’ at the right places (at the beginning or elsewhere) of an action.
The reverse, i.e., ceasing a fork is done by the same keyword shortcut. However, the result will not be the exact inverse. Let’s cease fork the example when ‘Fork after’ is pressed. Here we should select the new empty action and press Ctrl +f:
Image without caption
However, the graph is not linear. To do this press Shift + Tab at action ‘third action’:
Image without caption
Now we have the graph, we like it. Anyway, Tab and Shift + Tab are working except to create an unwanted graph appearance.

Join

It can occur that after forking the same steps should be executed for both test cases, i.e., the forked paths will join. Just add the step you want to join the fork. This step will be the child of the previous step. By backward tabulation (pressing Shift + Tab) the step moves left and becomes a join step. Let’s fill in the empty action in our previous model:
Image without caption
Then add the step that will join the branches:
Image without caption
Finally, let’s tab the last step backward (Shift + Tab). The resulting model is as follows:
Image without caption

Precondition (initial state)

Each sub-model can start with an initial state. The initial state should be an existing state set in a different model. Here is an example:
Image without caption
After sign up, the software arrived at the ‘REGISTERED’ state
We can use this state as an initial state in another model:
Image without caption
The new state ‘PROJECT OPENED’ can also be used as an initial state elsewhere, thus you can build complex model from simple sub-models.
Note that states should be uniquely determined.
To create an initial state (precondition), let’s create an empty action, then press ‘#’. Alternatively, create an initial state from the menu:
Image without caption
or use the related tab next to ‘Test design’:
Image without caption
You will see:
Image without caption
Then write the necessary state you want to reach at this point:
Image without caption

Autocomplete recommendation

Starting a new action-state item and entering at least one character, Harmony offers the list of the existing elements. You can select any items from the recommendation list:
Image without caption
Selecting an item, you can use ↑↓ keyboard keys or your mouse. You can reduce the number of found elements by adding more characters:
Image without caption
When you press ESC the item will be the written characters:
Image without caption
The matching elements can be anywhere in the action-state item:
Image without caption

Undo, redo

As expected, Ctrl+Y will redo the last action performed. while Ctrl+Z will undo the last action.

Open and close subgraphs

If you make a large model (we advise is to avoid it), then you may need to see only some parts of it. For example, you only want to see the subgraph below ‘Second label’:
Image without caption
To do this just press the v icon next to ‘Label’:
Image without caption
To see the graph belonging to ‘Label’, just press > next to it.

Moving a step to another place

First, select and click on the node, you want to move. Let’s select the second step:
Image without caption
Then move it to below action b:
Image without caption
Sometimes you should use Shift + Tab to align the inserted step.

Shortening test cases - ‘end test here’

There are cases when we want to stop test cases at a given step. For example, if there is a common join step (node) for more forks:
Image without caption
If we want the last step of the third test/fork to be ‘successful new password …’ then we can stop this test by selecting the ‘end test here’ menu items:
Image without caption
The result will be the following:
Image without caption
You can see that for the third fork, there is no edge to the ‘join step’ and the related test case doesn’t contain the join step:
Image without caption
If after ending a test path there are steps with no other incoming edges, then these steps will be signed with strikethrough:
Image without caption
Each signed last step can be inverted by selecting the ‘end test here’ again:
Image without caption

Modifying actions and responses

You can modify an action or response so that all the occurrences will be modified and the low-level model remains the same:
Image without caption
pressing rename search for ‘coverage’ … both actions will be ‘search for ‘coverage’ (see the first and the last actions:
Image without caption
If you want to modify only a single action or response, then after modifying it press ESC:
Image without caption
You can see that the modified action search for ‘coverage’ has no low-level steps, you should automate it again.

Speeding up modeling - test design main menu

Making labels, preconditions or tabulating some steps made it easy with the test design main menu:
Image without caption
The first icon converts a label to step:
before
Image without caption
after
Image without caption
The second convert a step to a label:
before
Image without caption
after
Image without caption
The third converts a step to an initial state:
before
Image without caption
after
Image without caption
The next two will tabulate right and left, respectively.
The last one helps forking:
Image without caption
The final command is ‘Clear automation:
Image without caption
Image without caption