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. Creating a Project
- Go to https://cloud.harmony.ac and register or log in to your account.
- Click on “Personal projects”
- Click on “+New project” and provide a name for your project.
- You’ll now have an empty project ready to start designing tests.
3. Start test design
- In your project, click “+New feature” from the sidebar to create a new feature.
- Click on the newly created feature to open it.
- Click “+Start designing tests” to create a new test design tree.
4. Create a model
- Add responses by clicking on the ⇨ icon, you can add 0, 1, or more responses
- Add states by clicking on the ▢ icon, it’s optional
- Start a new step by pressing Enter in the previous step
- Use labels to organize your steps into a hierarchy, click on the Label icon:
- To create branches in your test, use forks.
- tab the steps you want to fork by clicking on the Tab icon:
b. use the fork icon to create the fork:
c. the result is here (you can also remove the fork):
- You can make a join step in the following way:
By clicking Unindent the last step will become a join node.
- Continue adding steps, labels, and forks until you’ve designed your test thoroughly.
5. Starting the Runner
To automate and run your tests locally,
- Install Node.js - https://nodejs.org/en/download
- 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”
check Cloud run:
Then
- Select the project in Harmony
- Set the URL of the application to be tested in the “Parameters” window:
6. Automating Your First Tests
- With the runner running, open the Harmony web application in your browser.
- Go to your project and feature containing the test design you want to automate.
- Hover the mouse on a node in the test case to be executed. It will turn into a play icon then click on it
- The embedded browser will open, and you can now record the actions and responses for each step.
- 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
- 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.
- During recording, Harmony generates and Playwright executes the automated test steps.
- To stop automation press the “stop” icon:
Exercises
Pizza - https://harmony.ac/pizza/
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.
ISTQB Glossary - https://glossary.istqb.org/
Make the test design and automate the following requirements of the Glossary application.
R1 Available attributes are: “Name”, “Abbreviation”, “Definition”, “Synonym”, “Reference”.
R2 By default, the attributes “Name”, “Abbreviation” and “Synonym” are selected, the others are not.
R3 Given the search option settings dialogue, the users have the options to reset all options to default, save their changes, or cancel their changes.
R4a Given the Search in Attributes group, the user can check and uncheck all attributes at once.
R4b Given the Search in Attributes group, the user can check and uncheck any attribute individually.
R5 The system remembers and uses the search option settings during a browser session.
Car rental - https://exercises.test-design.org/rental/
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.