Create a concrete test model
A unique feature of Harmony is to generate a concrete model from the abstract one. By applying other tools, you should create a concrete model during which several mistakes can be made.
Gherkin++ is an extension of the original Gherkin language. The main difference is that based on the Gherkin you should make the code, while Gherkin++ steps can be compiled to executable test code.
Both actions and responses can be automatically extended to phrases. A phrase starts with the action/response name in the abstract model. Then the necessary concrete steps are added. Each step consists of four:
- Gherkin++ initial keyword WHEN, THEN, AND, IF.
- Selector (abstract)
- Gherkin++ middle keyword IS, HAS, etc.
- Value (abstract)
The process is that you execute a test case manually while the Cypress Runner is running. Harmony displays an action or a response, you should execute. The actions are very straightforward as you should enter text or click on buttons, while Harmony generates the selectors and the phrases into the related windows. For responses, you should select the necessary command from a list. For example, if you would like to validate that a button is active, you will select the #active command.
During this process, the test steps are executed, thus you can validate the results immediately. For example, if you select a wrong command such as #non-active, when the button is active, your test fails and you should fix the validation.
When you are ready just press the Done button:
The necessary selectors, values, and phrases are generated. When the test is ready, you should execute it again. Re-executing is necessary as the timing for step-by-step and all-in-one executions is different and it can occur that some wait-until action or forced click/type should be added.