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 on “+New feature” from the sidebar to create a new feature.
- Click on the newly created feature to open it.
- Click on “+Start designing tests” to create a new test design tree.
4. Create a model
- Add responses by clicking on the → icon
- Start a new step by pressing Enter in the previous step
- Use labels to organize your steps into a hierarchy. Click “>” at the beginning of a new step and provide a name for the label.
- To create branches in your test, use forks. Click “Alt + Enter” to start a branch from the current step or make a step to be a fork by clicking “Ctrl + f”. Remove an existing fork by pressing “Ctrl + f”
- Continue adding steps, labels, and forks until you’ve designed your test thoroughly.
5. Starting the Runner
- To automate and run your tests locally, open your terminal or command prompt.
- Install Node.js - https://nodejs.org/en/download
- Start Harmony’s runner using the following command: command:
npx -y @harmony.ac/runner@latest
.
- 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 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 select the OK icon :
or select the appropriate validation command after right mouse click:
- After recording, save the test, and Harmony will generate the automated test suite.
- 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.