Magento & Mage-OS · E2E code coverage
Code with AI.
Verify with evidence.
See what your Magento end-to-end tests actually execute across PHP, JavaScript and templates. Find the gaps, strengthen your tests, and give AI-assisted development evidence it can use.
One run. Three perspectives.
From browser action
to the code behind it.
A passing journey tells you the assertions held. MageLens adds a view of the eligible source that journey reached—and the code your suite left untouched.
PHP execution
See executable PHP lines reached by Magento HTTP requests, mapped to your original .php and .phtml source.
Emitted HTML and inline JavaScript are excluded from PHP line coverage.
JavaScript execution
Inspect Istanbul coverage for whole .js files. Statement coverage makes the headline metric useful even for bundled code.
Application and library reports remain separate. Inline scripts belong to template coverage.
Template execution
Inspect HTML/PHTML bindings, template expressions and inline scripts, with script functions, branches and DOM presence reported separately.
Unsupported syntax and unmapped generated output remain visible as measurement warnings.
Built from real Magento work
E2E tests.
Still more to discover.
MageLens grew out of a real-world Magento project with more than 600 end-to-end tests. Coverage helped uncover forgotten features, broken functionality and legacy template overrides that tests never exercised.
Project experience described in the MageLens README. Results depend on your application and scenarios.
- Find meaningful gaps
Connect catalog, account, checkout and Admin journeys to the application code they reach. Choose the next test from the uncovered behavior.
- Review changes with context
Inspect execution in custom modules and active local themes. Include vendor packages explicitly when they are part of the question.
- Keep a repeatable local workflow
Run the application, browser and coverage tools in Docker. Watch Cypress or Playwright in the same read-only live viewer.
- Inspect an actual result
The published Hyvä CSP demo contains 98 passing Playwright tests, with PHP, JavaScript and template reports. Open the demo ↗
AI-assisted development, grounded in execution
Give your assistant
a feedback loop.
Generated code is a proposal. Real browser scenarios, assertions and current-run coverage give you concrete evidence to inspect before accepting a change.
- Define the behaviorDescribe the customer journey and the observable result the test must verify.
- Make the changeWork with your coding assistant in the original application source.
- Run & inspectRun the configured suite. Review failures, executed locations and measurement warnings.
- Close the gapAdd missing interactions and assertions, fix the implementation, then collect fresh evidence.
Deterministic evidence.
A precise scope.
Use the tested source, current-run records and actual test outcomes to ground a review. MageLens checks source integrity and requires passing tests and valid current-run data before publishing the combined report and success badges.
Coverage shows what executed. Assertions check what happened. Neither a high percentage nor an AI explanation proves the entire application is correct.
Read the coding-agent workflow →- Source
- Exact tested revision
- Behavior
- Scenario + assertion
- Execution
- File + source location
- Integrity
- Fresh records + matching source
- Limitations
- Scope + warnings
Engineering guide
Scale the suite.
Keep the evidence.
Learn how a real Magento project separates smoke feedback from full coverage, runs eight isolated suites, and validates raw records before merging reports.
Parallel CI · Cypress · PHP / JavaScript / templates
Parallel Magento E2E testing: faster feedback, trustworthy coverage
A complete guide to shard isolation, source identity, zero-hit baselines, coverage-map merging and honest failure status—with practical examples and a direct link to the technical source.
Read the full guideStart with your application
One environment.
Fresh reports.
Install MageLens, choose your platform, storefront and browser runner, then run the full configured suite. Open coverage/index.html to inspect the combined report.
Requires Docker with Compose 2.24.4+, Linux or macOS, and at least 6 GB Docker RAM. Magento Open Source needs Marketplace credentials; Mage-OS uses its public Composer repository.
Follow the complete installation guide →# In your downloaded MageLens project:
# Mage-OS + Hyvä CSP + Playwright
./install.sh --mageos --hyva --playwright
# Run the full configured suite
./bin/run-coverage
# Open the combined report
# coverage/index.htmlBefore you start
Good questions. Clear boundaries.
Can I use my own Magento project and themes?
Yes. Copy custom modules and themes into their normal Magento paths, or copy a complete project before installation. Coverage follows configured active local themes. Vendor packages require explicit inclusion. See the source adoption guide.
Does it work with Hyvä and Mage-OS?
Yes. The documented setup supports Magento Open Source and Mage-OS, Luma, Hyvä CSP or legacy Hyvä, and Cypress or Playwright. Licensed Hyvä Checkout is a separate product; the bundled fallback checkout uses Luma.
Will coverage prove that AI-generated code is correct?
Coverage proves only that measured source locations executed during the run. Meaningful assertions, review and suitable scenarios are still essential. It helps an assistant and a developer identify missing evidence and verify a change against observable behavior.
Can MageLens automatically shard the suite across CI runners?
The standard command runs the full configured suite in a single workspace. The parallel coverage guide explains application-specific CI orchestration and validated merging. It is not a built-in distributed MageLens command.
Does MageLens change the original source for coverage?
Coverage uses disposable source copies and checks source integrity. Original source files and PHP line numbers remain unchanged during collection. Installation and application setup are separate operations; follow the documented workflow.
Make the next test count.
Start with a real journey. See the code it reaches. Turn the missing evidence into your next improvement.