Skip to content

RI-6570 Configure code coverage reports for the playwright e2e tests #4722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: feature/RI-6570/PlayWright
Choose a base branch
from

Conversation

valkirilov
Copy link
Collaborator

Description

Integrating NYC (Istanbul) code coverage collection into our Playwright E2E test suite, enabling automatic frontend code coverage reporting during test execution.

  • extended Playwright fixtures to automatically collect Istanbul coverage data after each test
  • added NYC configuration to properly process and report coverage for the UI source code
  • enhanced package.json scripts with coverage-specific commands for running tests and generating reports

How to Use

Running Tests with Coverage

# Start the UI server with coverage instrumentation
yarn dev:ui:coverage

# In another terminal, run tests with coverage collection
cd tests/playwright
yarn test:coverage

Viewing Coverage Reports

After running tests with coverage, reports are generated in tests/playwright/coverage/:

  • HTML Report: Open coverage/index.html in your browser for an interactive coverage explorer
  • LCOV Report: coverage/lcov.info for CI/CD integration (Codecov, etc.)
  • Console Output: Text-based coverage summary displayed during test execution
image

@valkirilov valkirilov self-assigned this Jul 15, 2025
@valkirilov valkirilov marked this pull request as ready for review July 15, 2025 12:06
@valkirilov valkirilov changed the title feat: configure code coverage reports for the playwright e2e tests RI-6570 Configure code coverage reports for the playwright e2e tests Jul 15, 2025
Copy link
Contributor

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 81.37% 18403/22616
🟡 Branches 67% 8068/12042
🟡 Functions 75.14% 4867/6477
🟢 Lines 81.76% 18006/22024

Test suite run success

4792 tests passing in 628 suites.

Report generated by 🧪jest coverage report action from 687d9b1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants