fix(ci): mostrar progreso de tests Playwright en consola de Jenkins
Con --reporter=junit,html el output a stdout era vacío (junit escribe a archivo, html a carpeta) — la consola se quedaba colgada en "Running 48 tests" hasta que terminaba toda la suite. Cambios: - Agregar 'list' al --reporter para imprimir una línea por test conforme corren. Visible en Jenkins live. - stdbuf -oL -eL fuerza line-buffering para evitar que pnpm/playwright acumulen el output hasta el final. - FORCE_COLOR=0 evita ANSI escapes que se ven feo en logs de Jenkins. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
@@ -502,9 +502,16 @@ pipeline {
|
||||
echo "✓ Playwright listo"
|
||||
|
||||
# ── Correr tests ────────────────────────────────────────────────
|
||||
# --reporter=list,junit,html:
|
||||
# - list → progreso por test a stdout (visible en Jenkins)
|
||||
# - junit → archivo XML para junit() plugin
|
||||
# - html → carpeta playwright-report con UI
|
||||
# stdbuf -oL fuerza buffer por líneas para que Jenkins vea el output
|
||||
# incremental aunque pnpm/playwright bufferen.
|
||||
E2E_EXIT=0
|
||||
docker exec \
|
||||
-e CI=true \
|
||||
-e FORCE_COLOR=0 \
|
||||
-e "JENKINS_URL=${JENKINS_URL}" \
|
||||
-e "PLAYWRIGHT_TEST_BASE_URL=http://localhost:5173" \
|
||||
-e "E2E_TEST_USER=${E2E_USER}" \
|
||||
@@ -512,8 +519,8 @@ pipeline {
|
||||
-e "PLAYWRIGHT_JUNIT_OUTPUT_NAME=playwright-results.xml" \
|
||||
-w /workspace/frontend \
|
||||
"$PLAYWRIGHT_C" \
|
||||
pnpm exec playwright test \
|
||||
--reporter=junit,html \
|
||||
stdbuf -oL -eL pnpm exec playwright test \
|
||||
--reporter=list,junit,html \
|
||||
--trace=retain-on-failure || E2E_EXIT=$?
|
||||
|
||||
# Copiar artefactos antes de salir (pase o falle)
|
||||
|
||||
Reference in New Issue
Block a user