Repository navigation
End-to-end tests (Playwright): API and GUI - #236
Merged
Merged
Conversation
…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 id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 39903390 | Triggered | Generic Password | 85c5f6a | e2e/support/env.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- 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
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MVP of end-to-end tests in
e2e/(Playwright + TypeScript), seee2e/README.md.e2e.yml: docker compose + tests on PRs and master; the HTML report as theplaywright-reportartifact.e2e/excluded from the Docker build context.Locally: 17 passed, 3× repeated without flaky tests (~10 s).