Skip to content

CI Integration

xyva's Runner is designed to work in both desktop and CI environments. This page covers headless execution, report generation, and pipeline configuration for GitLab CI and GitHub Actions.

Headless Mode

In CI environments, tests run headless by default — no visible browser window. This is the standard Playwright behavior and requires no additional configuration.

bash
npx playwright test --reporter=junit

Forcing Headless Locally

You can simulate CI behavior locally by disabling Debug Mode and unchecking Headed in the Runner toolbar. This is useful for validating that tests pass in the same mode CI uses.

JUnit XML Reports

xyva generates JUnit XML reports compatible with GitLab, GitHub Actions, Jenkins, and most CI platforms:

xml
<testsuites>
  <testsuite name="login.spec.ts" tests="4" failures="1" time="5.2">
    <testcase name="should accept valid credentials" time="1.2"/>
    <testcase name="should reject wrong password" time="0.8"/>
    <testcase name="should lock after 5 attempts" time="2.1">
      <failure message="Expected locked, got active"/>
    </testcase>
    <testcase name="should show reset link" time="1.1"/>
  </testsuite>
</testsuites>

The report is written to results.xml by default. Configure the path in Settings > Runner > Report Path.

GitLab CI Pipeline

Example .gitlab-ci.yml stage for running xyva tests:

yaml
test:e2e:
  stage: test
  image: mcr.microsoft.com/playwright:v1.52.0-noble
  script:
    - npm ci
    - npx playwright test --reporter=junit --output=results.xml
  artifacts:
    when: always
    reports:
      junit: results.xml
    paths:
      - results.xml
      - .xyva/screenshots/

GitLab Test Report

When you declare reports: junit, GitLab parses the XML and shows test results directly in the merge request UI — including failure details and trend charts.

GitHub Actions

Equivalent workflow step for GitHub Actions:

yaml
- name: Run Playwright tests
  run: npx playwright test --reporter=junit
- name: Upload test results
  if: always()
  uses: actions/upload-artifact@v4
  with:
    name: test-results
    path: |
      results.xml
      .xyva/screenshots/

Artifacts

Configure the Runner to preserve these artifacts for post-run analysis:

ArtifactPathPurpose
JUnit XMLresults.xmlMachine-readable test results
Screenshots.xyva/screenshots/Visual evidence of failures
Traces.xyva/traces/Full Playwright trace archives
HTML Reportplaywright-report/Browsable Playwright HTML report

Matrix Strategy

Run the same tests across multiple browsers in parallel using a CI matrix:

yaml
strategy:
  matrix:
    browser: [chromium, firefox, webkit]
steps:
  - run: npx playwright test --project=${{ matrix.browser }}

Browser Installation in CI

CI images may not include all browser binaries. Add npx playwright install --with-deps before the test step to ensure browsers are available.

Local-first QA orchestration.