Skip to content

Config Builder

Interactive tool to generate test.performance() configuration.

Configuration

Test Options
Enable warmup iteration
CPU throttle rate
Test iterations
Network throttling
Profiler Thresholds
Max duration (ms)
Max rerenders
Other Thresholds
Min FPS (Chromium)
Max heap growth (MB)
Max LCP (ms)
Max INP (ms)
Max CLS

Generated Code

test.performance({
  thresholds: {
    base: {
      profiler: {
        '*': { duration: 500, rerenders: 20 },
      },
    },
  },
})('test name', async ({ page, performance }) => {
  await page.goto('/');
  await performance.init();
});

How to Use

  1. Configure test options – Set warmup, throttling, iterations, and network conditions
  2. Set profiler thresholds – Define max duration and rerenders
  3. Add optional thresholds – Enable FPS, memory, or Web Vitals tracking
  4. Copy the generated code – Paste into your test file

Understanding the Options

Test Options

OptionDescription
WarmupRun an excluded warmup iteration to reduce cold-start variance
CPU ThrottleSimulate slower CPUs (Chromium only)
IterationsRun multiple times for statistical reliability
NetworkSimulate network conditions (Chromium only)

Profiler Thresholds

ThresholdDescription
DurationMaximum total render time in milliseconds
RerendersMaximum number of React renders

Optional Thresholds

ThresholdDescriptionBrowser
FPSMinimum frames per secondChromium
Heap GrowthMaximum memory growth in MBChromium
LCPLargest Contentful Paint (ms)All
INPInteraction to Next Paint (ms)All
CLSCumulative Layout ShiftAll

Next Steps