Using Claude Code, Cursor, or another coding agent? Paste this into your prompt to run cross-browser and real-device tests, debug sessions, and wire up CI on the TestMu AI cloud:
How Capture Works
Performance data is navigation-based. Metrics are measured for the most recent page navigation:- Automatic measurement: KaneAI uses the web-vitals library to capture metrics
- Per-navigation scope: Metrics reflect the last full page load. If you navigate to a new page, the metrics reset for that navigation
- Point-in-time snapshot: When a performance checkpoint triggers, KaneAI captures the current metrics at that moment
What This Means for Your Tests
- Performance metrics describe the last navigation. If you navigate to Page A then Page B, the metrics reflect Page B
- Place performance assertions after the page you want to measure has fully loaded
- Use a wait step if the page needs time to settle before measuring
Available Metrics
Note: Not all metrics are available for every page. INP requires user interaction to trigger. Some metrics may be null if the browser hasn’t measured them yet.
Example Assertions
Example Extractions
Example If/Else
Tips
- Wait for load: Place a wait step before performance assertions to ensure the page has fully loaded and metrics are available
- Navigate first: Metrics are per-navigation. Make sure you’ve navigated to the target page before asserting
- Not all metrics are instant: CLS accumulates over time, INP requires interaction. LCP and FCP are typically available after the page visually completes loading