logo

Quick start guide

1. System requirements

Operating Systems
  • Linux
  • Windows 10 and above (64-bit only)
  • macOS
Browsers
  • Chrome
  • Edge - If it doesn’t work try InPrivte mode (Ctrl + Shift + N)
  • Firefox
    • Safari is NOT supported currently

2. Create a project

  1. Go to https://cloud.harmony.ac and register or log in to your account.
  1. Click on “Personal projects”
  1. Click on “+New project” and provide a name for your project.
  1. You’ll now have an empty project ready to start designing tests.

3. Start test design

  1. In your project, click “+New feature” from the sidebar to create a new feature.
  1. Click on the newly created feature to open it.
  1. Click “+Start designing tests” to create a new test design tree.

4. Create a model

  1. Start building your test steps by clicking the empty field “add some action”. Provide a human-readable action, response, and state, if applicable.
  1. Add responses by clicking on the ⇨ icon, you can add 0, 1, or more responses
  1. Add states by clicking on the ▢ icon, it’s optional
  1. Start a new step by pressing Enter in the previous step
  1. Use labels to organize your steps into a hierarchy, click on the Label icon:
    1. Image without caption
  1. To create branches in your test, use forks.
    1. tab the steps you want to fork by clicking on the Tab icon:
    2. Image without caption
      b. Use the fork icon to create the fork:
      Image without caption
      c. The result is here (you can also remove the fork):
      Image without caption
  1. You can make a join step in the following way:
    1. Image without caption
      By clicking Unindent, the last step will become a join node.
      Image without caption
  1. Continue adding steps, labels, and forks until you’ve designed your test thoroughly.

5. Start the Runner

To automate and run your tests locally,
  1. Install Node.js - https://nodejs.org/en/download
  1. Open your terminal or command prompt, then start Harmony’s runner using the following command: command: npx -y @harmony.ac/runner@latest.
Alternatively, you can use cloud run. After clicking “Settings”
Image without caption
check Cloud run:
Image without caption
Then
  1. Select the project in Harmony
  1. Set the URL of the application to be tested in the “Parameters” window:
Image without caption

6. Automate your first tests

  1. With the runner running, open the Harmony web application in your browser.
  1. Go to your project and feature containing the test design you want to automate.
  1. Hover the mouse on a node in the test case to be executed. It will turn into a play icon then click on it
  1. The embedded browser will open, and you can now record the actions and responses for each step.
  1. To automate an action just click on the button or enter a value. You can make several low-level actions and press “Done” when you are ready. The low-level model is generated and the test step is automatedly executed
  1. To automate a response just hover the mouse over the UI object, then click on it. Harmony knows that it’s a response and generates an assertion. You can make several low-level responses and press “Done” when you are ready.
  1. During recording, Harmony generates and Playwright executes the automated test steps.
  1. To stop automation press the “stop” icon:
Image without caption

Exercises

R1. If the total price excluding beverages reaches 30 euros for the first time, a beverage is offered to the customer.  The user can select one free Coke or Beer which is added to the previously ordered beverages. ‘Free coke’ or ‘Free beer’ is displayed when a free beverage is on the ordered list. 
R2. If the customer deletes food items and the price of pizzas goes below 30 euros, then the free beverage has been withdrawn. Adding the pizzas back the free beverage is also given back.
R3. The customer can delete the free beverage. When the non-beverage price condition holds and she adds the same beverage again, it remains free.
R4. The customer can clear all the items. Adding enough food again she can select any free beverage.
R5. The free beverage cannot be changed from Coke to beer or vice versa.
Make the test design and automate the following requirements of the Glossary application.
R1: When the term details are displayed for an item in a result list of terms, the user should be able to navigate to the details of the Next term or the previous term in the list with one click ("Next" and "Previous" buttons).
R2: The user should be able to go back to the search result list by pressing the up arrow (Up button).
R3: The navigation buttons shall have mouseover tooltips ("Next term in the list" for Next, "Previous term in the list" for Previous, and "Result list" for Up buttons)
R4a: The Next button shall only be active if there is a next term in the list, i.e., for the last term of the list, the Next button shall not be active (or not displayed).
R4b: The Previous button shall only be active if there is a previous term in the list, i.e., for the first term of the list, the Previous button shall not be active (or not displayed).
R5a: If the user leaves the term details for the selected term, the buttons will disappear.
R5b: If the user changes the language, the buttons are inactive (disabled).
A rental company loans cars (EUR 300), and bikes (EUR 100) for a week.
R1 The customer can add cars or bikes one by one to the rental order.
R2 The customer can remove cars or bikes one by one from the rental order.
R3 If the customer rents cars for more than EUR 600, then they can rent one bike for free. In case of discount:
R3a If the customer has selected some bikes previously, then one of them becomes free.
R3b If the customer hasn't selected any bike previously, then one free bike is added.
R4 If the customer deletes some cars from the order so that the discount threshold
doesn't hold, then the free bike will be withdrawn.
R4a When the discount is withdrawn but given again, and no bike was added
meanwhile, the customer gets the previous discount back.
R4b When the discount is withdrawn and some bikes are added when the discount is
given again, then one of them becomes free.
R5 If the customer deletes the free bike, then no money discount is given. Adding the bike back the discount is given again by converting the bike price to zero.