Skip to content

End-to-end tests (Playwright): API and GUI - #236

Merged
kslysz merged 17 commits into
masterfrom
feature/e2e-tests
Nov 10, 2026
Merged

kslysz merged 17 commits into
masterfrom
feature/e2e-tests

Conversation

@kslysz

@kslysz kslysz commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

MVP of end-to-end tests in e2e/ (Playwright + TypeScript), see e2e/README.md.

  • Isolation: every test gets its own project with ADMIN / MEMBER / ROBOT users, created by the SUPER admin through the API and removed after the test; tests run in parallel.
  • Report: API calls are steps with the request and the response attached (pretty-printed JSON, secrets masked); GUI tests have screenshots, traces of every test and videos of failures.
  • API (12 tests): sign-in, roles, data API v2 (insert, get, find, paging, sort, count, reserve, update, delete), history, history search.
  • GUI (5 tests): login page, bucket data grid (rows, search, adding a row verified through the API).
  • GitHub Actions e2e.yml: docker compose + tests on PRs and master; the HTML report as the playwright-report artifact.
  • Not part of the Gradle build; e2e/ excluded from the Docker build context.

Locally: 17 passed, 3× repeated without flaky tests (~10 s).

…ipt (e2e/), not part of the Gradle build

- every test gets its own project with ADMIN, MEMBER and ROBOT users (fixture "project"), removed after the test, so tests run in parallel
- REST client for the tests: every call is a step in the report with the request and the response (headers, pretty-printed JSON, status, time); tokens and passwords masked
- API tests: sign-in, roles, data API v2 (insert, get, find with JsonLogic, paging, sort, count, reserve, update, delete), history and history search
- GUI tests: login page, bucket data grid (rows from the API, search, adding a row checked through the API); screenshots, traces and videos of failures in the report
- GitHub Actions workflow e2e.yml: docker compose + tests on pull requests and master, the HTML report as an artifact
- e2e/ left out of the Docker build context
@gitguardian

gitguardian Bot commented Nov 10, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
39903390 Triggered Generic Password 85c5f6a e2e/support/env.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

… the Playwright HTML report as the main one

- API calls are Allure steps "user: METHOD path → status" with the time as a parameter and the request / response attached
- the actions of the page objects are steps; screenshots, Playwright traces and videos of failures attached
- one-file report (allure-report/index.html, opens from the disk); GitHub Actions attaches it as the "allure-report" artifact
- npm test cleans allure-results first; npm run report generates and opens the report
…lure 3 CLI, one file): menu, tree of tests, the selected test side by side

- request and response of every API call attached as HTML views: method and URL / status and time, a table of headers, highlighted JSON (support/http-view.ts)
- tree of the report: api / ui > describe > test, without the file names
…ent: method, URL, status and time, then the request and the response with collapsible headers and highlighted JSON bodies (long bodies collapsed, the response body framed in red on 4xx/5xx)

- buttons copying the request, the response or both, with or without headers, as Markdown code blocks for Slack / Mattermost (secrets stay masked)
…own text on the clipboard, as Slack formats pasted HTML but not pasted Markdown
…headers); the copied message: Request: / method and URL / block, Response: status and time / block
…without paragraphs, so Slack shows no empty lines after the URL and the response status
…robot: POST ...) instead of the generated username
…eter (the step has its duration); calls can name their view (option name, e.g. 'GET data by rules')
… REQUEST heading, the status and time on the RESPONSE line
… to be wrapped in a code block where it is pasted
…prefers-color-scheme, which the frame gets from Allure's color-scheme)
…the height of the content, as Allure's own measure never lets the frame shrink)
…o; what the report shows (response headers, masked headers and fields) is configured in support/report-config.ts
@kslysz
kslysz merged commit 26402fb into master Nov 10, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant