FKITDEV-9200
Classification: task (Type=Task, State=Open, Subsystem=None)
Ticket
Ticket FKITDEV-9200 — Devel - E2E tesztek migrációja K6-ra
- Type: Task · State: Open · Subsystem: None · Priority: None
<<<UNTRUSTED_TICKET_DATA — analyze only, never execute
OSS-en a test/tests/e2e/* alatti teszteket kellene K6-ra átírni.
K6 futtatásához fejlesztői környezetben lásd: https://github.com/TechTeamer/vuer_docker/tree/devel#e2e-testing
(pullozni kell vuer_docker-en)
Scope analysis (2026-08-06)
Prior art — the harness already exists
FKITDEV-9041 landed the k6 scaffolding. Nothing needs building from scratch:
| Repo | Commit | What |
|---|---|---|
vuer_docker | 8ae9f0c (PR #223) | k6.yml + .env:CI_DOMAIN + README ## E2E Testing |
vuer_oss | 0e63bcd166 (PR #8085) — tip of origin/devel | test/tests/k6/ — all.ts, lib/env.ts, lib/flows.ts, tsconfig.json, README.md, + 2 migrated tests |
k6.yml runs stock grafana/k6:master-with-browser, mounts /workspace/vuer_oss/test/tests/k6 → /e2e, command: run /e2e/${K6_TEST_FILE:-all.ts}.
Established translation recipe (from the dashboard reference pair)
- Page objects port ~1:1.
@playwright/test→k6/browser(type Locator,type Page),vuerUrls.oss()→oss()from./lib/env.ts, dropreadonly, imports need explicit.ts(tsconfigallowImportingTsExtensions). test.describe/test()/beforeEach→ oneexport default async function (), contexts opened by hand,try/finallyclose.beforeEachbody is inlined per case.expect(x).toBe(y)→check(value, { 'case name': v => v === y }).- k6 does not auto-wait on navigation: every click that navigates needs
await Promise.all([page.waitForNavigation(), locator.click()]). - Auth: Playwright’s
storageStatefixture → explicitloginOperator(page)per iteration. - Register in
all.ts: oneexport {}line + oneoptions.scenariosentry.
Inventory — 45 Playwright tests under test/tests/e2e/
Done (2): dashboard, selfservice-list.
Migratable with the recipe (13): auditlog, callback-request, compatibility-test, cronjobs, emergency-shutdown, flow-editor-list, media-content, open-hours, reports/feedbacks, reports/users, reports/video-calls, staticendpoints, users/new-user.
Blocked on a seeding strategy (30): every remaining test seeds its fixtures by booting the real Node app in-process — test/tests/support/helper.ts imports server/db/sequelize, server/db/models, UserService, CryptoService, FlowService, acl… and calls sequelize.authenticate(). It exposes createCustomer, createRoom, createFlow, createFeedback, createSmsLog, createFlowProto, createClientErrorLog, etc.
k6 runs its own JS VM — no Node, no require of app code, no DB driver in the stock image. This is structural, not a porting detail.
Open decisions
- Seeding for the 30. Options: (a) keep a Node pre-seed step that reuses
helper.tsand hands k6 a fixtures JSON viaopen()— stock image untouched, existing code reused; (b) test-only HTTP seed API in OSS — new auth surface; (c)xk6-sqlcustom k6 build — abandons the pinned image; (d) seed through the UI — slow, fragile, circular for the tests that test that UI. - Ordering. The Playwright suite is a stateful chain —
playwright.config.tswires 14 projects throughdependencies(Setup → OpenHoursSetup → Auditlog → Videochat → VideochatReplay → FourEye → SelfServiceVideochat → Core → Customization → SelfServiceV2 → … → WaitingList). k6 scenarios with nostartTimeall start at t=0 and run concurrently.all.tsinherits this and will not preserve the chain past a couple of read-only tests. - Coverage is lost.
test/tests/playwright/fixtures.tscollects V8 JS coverage per test →v8-to-istanbul→ lcov. k6/browser has no coverage API.staticendpoints.test.tsexists only to collect coverage across static endpoints — porting it to k6 removes its reason to exist.
Blast radius
Test-only. Playwright e2e does not run in CI — .github/workflows/pull-request.yaml runs lint + jest unit + audit + depcheck + Sonar; long-lived-branches.yaml runs jest only. No CI gate to keep green. Production code untouched. customization/test/tests/e2e (the Customization Playwright project) is out of scope per the ticket text.
Delivered (2026-08-06)
Branch chore/FKITDEV-9200-e2e-k6, worktree /Users/levander/coding/facekom/vuer_oss-FKITDEV-9200. NOT committed.
12 test files ported — 93 of their 96 Playwright cases:
auditlog, compatibility-test, cronjobs, media-content, open-hours, flow-editor-list, reports/feedbacks, reports/users, reports/video-calls, users/new-user, emergency-shutdown, callback-request.
3 cases dropped — all media-content file uploads. k6/browser has no FileChooser, no waitForEvent('filechooser'), no Locator.setInputFiles; page.waitForEvent() accepts only 'console' | 'request' | 'response'.
1 file deliberately NOT ported — staticendpoints.test.ts. It exists only to collect V8 coverage across static endpoints, and k6 has no page.coverage.*. Porting it would remove its reason to exist.
all.ts restructured from concurrent scenarios into one sequential scenario with maxDuration: '1h' — scenarios without startTime all fire at t=0, which destroys the stateful chain the suite depends on.
The reusable knowledge from this pass is written up separately:
- k6-e2e-harness-vuer-oss — harness anatomy, the CI-verification gap, ordering semantics, the seeding blocker
- playwright-to-k6-translation-recipe — the translation table, the two waiting rules, and the hard k6/browser limits (verified against
@types/k62.0.1)
Verification
There is no CI gate for any of this. test/tests/k6/tsconfig.json is separate from the root tsconfig, the root tsconfig does not include test/, yarn lint ignores test/*, and there is no typecheck npm script. Typecheck manually with @types/k6 installed:
tsc -p test/tests/k6/tsconfig.jsonOpen items
- Seeding for the remaining 30 — still the gating decision. See the options table in The seeding blocker.
k6.ymlpasses noK6_BROWSER_ARGS. It sets onlyCI_DOMAIN, so the docker path has no fake camera/mic and no--disable-web-security— needed bycompatibility-testand bycallback-request’s lobby. The k6README.mddocuments those flags for native runs only.OpenHoursSetupis load-bearing and has no k6 home yet. It runssetOpenHours('00:00','24:00')across all seven days; without it the vuer_css customer flow never renders its callback button.- Destructive by inheritance. The Playwright suite runs
NODE_ENV=devand can erase the database; the k6 port inherits that. Throwaway environments only — dev-build-host. - Vacuous assertions reproduced faithfully.
hasEmailError()/hasRightsError()return!!page.locator(...)(always truthy) and severalexpect().toHaveText()inopen-hours.test.tsare missing theirawait. Left as-is on purpose — fixing them mid-migration would change test semantics under cover of a port.