▶ Watch VIDEO of the latest UI test run
uv sync
uv run playwright install chromium
cp .env.example .env # fill in BASE_URL, TEST_USER_EMAIL, TEST_USER_PASSWORD, API_BASE_URL, APPFOLLOW_API_TOKEN
uv run pytest tests/ui # UI tests
uv run pytest tests/api # API testsFor the UI test, I chose what I think is the main user flow: replying to negative reviews. In the test, we log in, filter the reviews with the lowest rating, and reply to one of them.
For the API test, I chose a request that gets the current workspaces as a simple proof of concept.
The full list is quite long, but these are the most important points:
- Reporting is very important. An Allure report is useful, but the whole team does not always see it. I think the tests should also send metrics to a tool like Grafana.
- Locators are a major issue. The current frontend is not well prepared for UI automation. It needs data attributes or test IDs. This would probably be the first step when working on automation.
- Support for different environments and browsers. At this stage, it would be too much optimization.
- The place where locators should be stored is still an open question. It depends on the project and its size.
- More time should be spent on test data: how it is created, used, and stored. For a demo project with only one user, this is not a problem yet.
- Some quality-of-life tools, such as linters and type checking.