Playwright end-to-end test project currently targeting the chromium project.
- Node.js LTS
- npm
From the project root:
npm install
npx playwright install chromiumnpm install installs the project dependencies, including @playwright/test.
npx playwright install chromium installs the Chromium browser used by the tests.
Create a .env file at the project root.
Example:
LOGIN=your-login
PASSWORD=your-password
BASE_URL=https://your-url/convertigo/projects/C8Oforms/DisplayObjects/mobile/
CI=true
WORKERS=1
RETRIES=0
REPEAT_EACH=1
PLAYWRIGHT_TIMEOUT_MS=60000
PLAYWRIGHT_TEST_TIMEOUT_MS=180000Build the image:
docker build -t playwright-c8oforms-benchmarks:latest .Run the test container:
docker run --rm --ipc=host --env-file .env \
-e WORKERS=1 \
-e RETRIES=0 \
-e REPEAT_EACH=1 \
-e PLAYWRIGHT_TIMEOUT_MS=60000 \
-e PLAYWRIGHT_TEST_TIMEOUT_MS=180000 \
playwright-c8oforms-benchmarks:latestPass extra Playwright arguments after the image name, for example:
docker run --rm --ipc=host --env-file .env \
-e WORKERS=1 \
-e REPEAT_EACH=1 \
playwright-c8oforms-benchmarks:latest --project=chromium --grep "NO CODE STUDIO"The container writes test artifacts to /tmp/playwright-results and the HTML report to /tmp/playwright-report.
The repository includes OpenShift manifests:
Typical usage:
oc apply -f openshift/configmap.yaml
oc apply -f openshift/secret.example.yaml
oc apply -f openshift/job.yamlBefore applying the Job:
- update the image reference in
openshift/job.yaml - replace the placeholder values in the ConfigMap and Secret
LOGIN: login used by the test.PASSWORD: password used by the test.BASE_URL: base URL used by Playwright. The test then navigates toindex.html.CI: enables CI mode in the Playwright config.WORKERS: number of Playwright workers.RETRIES: number of retries when a test fails.REPEAT_EACH: number of times each test is repeated.PLAYWRIGHT_TIMEOUT_MS: timeout used forexpectand navigation.PLAYWRIGHT_TEST_TIMEOUT_MS: global timeout for a test.
The repository also includes a k6 script that replays the C8Oforms business flow at the HTTP level:
By default it runs the full authenticated app flow, then continues into the published PWA viewer requests captured from production. It also validates JSON payloads so a plain HTTP 200 is not treated as success when the response body contains application-level errors.
The script also includes configurable think time so one virtual user behaves more like a real person moving through the app instead of firing requests back-to-back.
Typical authenticated run:
BASE_ORIGIN=https://toulouse-m-prod.convertigo.com \
LOGIN=your-login \
PASSWORD=your-password \
PUBLISHED_APP_ID=published_1774946272392 \
/opt/homebrew/bin/k6 run k6/convertigo-dev-c8oforms.jsTo replay only the direct PWA viewer portion instead:
BASE_ORIGIN=https://toulouse-m-prod.convertigo.com \
FLOW_MODE=pwa-viewer \
/opt/homebrew/bin/k6 run k6/convertigo-dev-c8oforms.jsUseful environment variables:
BASE_ORIGIN: target origin to benchmark, defaulthttps://toulouse-m-prod.convertigo.comFLOW_MODE:full-apporpwa-viewer, defaultfull-appPUBLISHED_APP_ID: published PWA identifier, defaultpublished_1774946272392LOGIN,PASSWORD: required whenFLOW_MODE=full-appVUS,ITERATIONSASSET_MODE=full|business-onlyLOAD_STATICS_ONCE_PER_VU=true|falseSIMULATE_HTTP_CACHE=true|falseTHINK_TIME_ENABLED=true|falseTHINK_TIME_MIN_SECONDS,THINK_TIME_MAX_SECONDSTHINK_TIME_AFTER_LOGIN_SECONDSTHINK_TIME_AFTER_NAV_SECONDSTHINK_TIME_VIEW_SECONDSASSET_BATCH_SIZE,ASSET_TIMEOUT,CLIENT_TIMEOUTDEBUG_FAILURES=true|falseDEBUG_PROGRESS=true|false
Example with more realistic pacing:
BASE_ORIGIN=https://toulouse-m-prod.convertigo.com \
LOGIN=your-login \
PASSWORD=your-password \
THINK_TIME_ENABLED=true \
THINK_TIME_MIN_SECONDS=2 \
THINK_TIME_MAX_SECONDS=6 \
THINK_TIME_AFTER_LOGIN_SECONDS=3 \
THINK_TIME_AFTER_NAV_SECONDS=2 \
THINK_TIME_VIEW_SECONDS=5 \
/opt/homebrew/bin/k6 run k6/convertigo-dev-c8oforms.jsThe convertigo-prod-scenaria.js script is a separate, HAR-derived scenario for the production tenant. It focuses on the authenticated business flow only and deliberately skips static assets so the measurements stay centered on backend/API behavior. It models the captured flow as explicit user stages with think time between them:
- bootstrap
- auth preflight
- login
- selector
- published app open
- viewer bootstrap
- document load
- data viewing
By default it also keeps cookies across iterations for each VU and reuses the authenticated session when it is still valid, so one VU behaves more like the same returning browser session instead of logging in and out on every iteration. You can disable cookie persistence with
K6_NO_COOKIES_RESET=false.
Typical staged scenario run:
BASE_ORIGIN=https://toulouse-m-prod.convertigo.com \
LOGIN=your-login \
PASSWORD=your-password \
THINK_TIME_ENABLED=true \
THINK_TIME_AFTER_STAGE_SECONDS=2 \
THINK_TIME_VIEW_SECONDS=5 \
/opt/homebrew/bin/k6 run k6/convertigo-prod-scenaria.jsThe repository also includes a dedicated static-asset k6 bench:
Its goal is to isolate frontend asset serving from the business flow and compare different access paths:
- public hostname through Envoy Gateway
- internal service path
- direct pod IP path
Typical public-path run:
BASE_ORIGIN=https://toulouse-m-dev.convertigo.com \
/opt/homebrew/bin/k6 run \
--stage 1m:20 \
--stage 1m:20 \
--stage 5s:0 \
k6/convertigo-static-path-bench.jsTypical direct-pod comparison:
BASE_ORIGIN=http://10.21.8.95:28080 \
/opt/homebrew/bin/k6 run \
--stage 30s:20 \
--stage 30s:20 \
--stage 5s:0 \
k6/convertigo-static-path-bench.jsUseful environment variables:
BASE_ORIGIN: target origin to benchmarkPUBLISHED_APP_ID: published PWA identifier, defaultpublished_1774946272392ASSET_GROUPS: comma-separated asset groups, defaultcritical-mobile,critical-pwaASSET_TIMEOUT: per-request timeout, default30sASSET_BATCH_SIZE: concurrent asset batch size inside one VU, default6START_VUS,TARGET_VUS,RAMP_UP,HOLD,RAMP_DOWNDEBUG_FAILURES=true|falseDEBUG_PROGRESS=true|false
This bench is useful to determine whether bottlenecks are primarily on:
- the public Gateway/LB path
- the Convertigo service itself
- or the shared storage path behind Convertigo
To correlate k6 results with live cluster state, use:
Example:
chmod +x scripts/collect-cluster-bottlenecks.sh
KUBECONFIG_PATH=/Users/opic/outscale/outscale.yaml \
scripts/collect-cluster-bottlenecks.shIt captures:
kubectl top nodeskubectl top pods -A- Convertigo pod placement and deployment details
- Envoy Gateway pod placement, top output, deployment config, and recent logs
- Longhorn pod placement, top output, and the current workspace volume spec
List detected tests:
npx playwright test --listRun all tests:
npx playwright testRun a single file:
npx playwright test tests/test-1.spec.ts --project=chromiumOverride values at runtime:
WORKERS=1 REPEAT_EACH=1 PLAYWRIGHT_TIMEOUT_MS=60000 PLAYWRIGHT_TEST_TIMEOUT_MS=180000 npx playwright testOpen the HTML report:
npx playwright show-report- The Playwright config is in playwright.config.ts.
- The main test is in tests/test-1.spec.ts.
- The Playwright project currently in use is
chromium. - Application loading waits for
domcontentloaded, Ionic hydration when present, and then for loading overlays to disappear.
- The
.envfile is ignored by Git. - The Playwright config logs the effective loaded values at startup, which helps diagnose timeout or environment variable issues.
- The Docker image is based on
mcr.microsoft.com/playwright:v1.58.2-noble, matching the Playwright version declared inpackage.json.