Fix CircleCI JUnit XML test result collection #128
Merged
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.
Fix CircleCI JUnit XML test result collection
Summary
Resolves the CircleCI "0 test results uploaded" issue by fixing JUnit XML generation problems in both unit and E2E test configurations. The root causes were:
playwright.config.test.tsreferencednpm run servewhich doesn't exist inpackage.json(should benpm start)test-results/junit.xmlfilekarma-junit-reporterdependency and incomplete CircleCI browser orb usageKey Changes:
npm startscriptjunit.xml(unit tests) ande2e-junit.xml(E2E tests)karma-junit-reporterdependency and configured Karma to output JUnit XMLReview & Testing Checklist for Human
test-results/junit.xmlandtest-results/e2e-junit.xmlfiles are generatednpm run test:unitand verifytest-results/junit.xmlis created (should be ~75KB)npx playwright test --config=playwright.config.test.ts --listto confirm no script errorsRecommended Test Plan: Run the CircleCI pipeline and check the "Test Summary" tab to verify test results are properly uploaded and displayed, rather than showing "0 test results uploaded".
Diagram
%%{ init : { "theme" : "default" }}%% graph TD subgraph "Test Configuration Files" A["playwright.config.test.ts"]:::major-edit B["karma.conf.js"]:::minor-edit C["package.json"]:::minor-edit end subgraph "CircleCI Pipeline" D[".circleci/config.yml"]:::context E["unit-tests job"]:::context F["e2e-tests job"]:::context end subgraph "Test Results" G["test-results/junit.xml<br/>(Unit Tests)"]:::context H["test-results/e2e-junit.xml<br/>(E2E Tests)"]:::context end A -->|"webServer: npm start"| E A -->|"junit reporter"| H B -->|"junit reporter"| G C -->|"karma-junit-reporter"| B E -->|"store_test_results"| G F -->|"store_test_results"| H D -->|"configures"| E D -->|"configures"| F subgraph Legend L1["Major Edit"]:::major-edit L2["Minor Edit"]:::minor-edit L3["Context/No Edit"]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
Local Testing Results:
junit.xml(75KB file confirmed)Potential Risks:
This PR was created with assistance from Devin AI
Link to Devin run: https://app.devin.ai/sessions/bd2b3c122e124b5c8c33c70100252188
Requested by: @timfee