📚 LLM HUB · 6 PROMPTS
Browser-Based Performance Testing
6 copy-ready AI prompts for browser-based performance testing in JMeter, k6, and Gatling. Part of the JMeter.AI LLM Hub.
k6 Browser Test Script
Generate a k6 browser-based performance test using the k6 browser module for: URL: [https://example.com] User journey: 1. Navigate to homepage 2. Click [element / button] 3. Fill form: username=[parameterized], password=[parameterized] 4. Submit and wait for [selector] to appear 5. Navigate to [next page] 6. Assert page title contains [text] Requirements: - Use k6/browser API (chromium) - Measure: page load time, LCP, FCP, CLS, TBT, TTFB - Collect Web Vitals using page.evaluate() - Run [N] browser VUs in parallel - Thresholds on browser_http_req_duration and web_vital_lcp - Screenshot on failure - headless: true for CI runs Output a complete k6 browser script.
Playwright + k6 Hybrid Testing
I want to combine Playwright for script recording with k6 browser for execution: Steps: 1. Use Playwright codegen to record the user journey on [URL] 2. Convert the Playwright script to k6 browser API 3. Add performance assertions 4. Run as part of CI pipeline Provide: - Playwright codegen command for [URL] - Mapping table: Playwright API → k6 browser API equivalent (page.goto, page.click, page.fill, page.waitForSelector, page.screenshot, expect) - k6 browser script converted from a typical Playwright output - Key differences to watch for during conversion - How to run k6 browser tests in headed vs headless mode - Docker command to run k6 browser in CI without display
Core Web Vitals Performance Baseline
I need to establish a Core Web Vitals performance baseline for [URL / web application] under load. Metrics to capture: - LCP (Largest Contentful Paint). target < 2.5s - FCP (First Contentful Paint). target < 1.8s - CLS (Cumulative Layout Shift). target < 0.1 - TBT (Total Blocking Time). target < 200ms - TTFB (Time to First Byte). target < 800ms - INP (Interaction to Next Paint). target < 200ms Generate: - k6 browser script that measures all Web Vitals via page.evaluate() and PerformanceObserver - How to export these metrics to InfluxDB / Grafana - Thresholds configuration in k6 options - How to distinguish server-side latency (TTFB) from client-side rendering issues (LCP, TBT) - Recommendations for testing across simulated network conditions (3G, 4G, broadband)
JMeter HTML Page Performance Testing
I need to measure full page load performance (including assets) with JMeter, not just API response times. Target URL: [https://example.com] Configure JMeter to: - Download embedded resources (CSS, JS, images) per request - Measure total page load time including all assets - Identify the slowest resources (images, JS bundles, fonts) - Simulate browser caching behavior (Cache Manager) - Simulate concurrent users loading the same page - Simulate parallel connections per user (concurrent pool size) Provide: - HTTP Request Defaults with "Retrieve All Embedded Resources" enabled - Parallel Downloads configuration (concurrent pool: 6) - HTTP Cache Manager for cache simulation - DNS Cache Manager - How to extract and report per-resource response times - Comparison: JMeter page load metrics vs Real User Monitoring (RUM) data
Browser vs Protocol Load Test Strategy
I need to decide between browser-based (k6 browser / Playwright) and protocol-level (JMeter / k6 HTTP) load testing for [application name]. Application characteristics: - [SPA / Server-rendered / Hybrid] - Heavy JavaScript rendering: [yes / no] - Critical user journeys depend on JS interactions: [yes / no] - Scale needed: [N] concurrent users - Infrastructure budget for test runners: [limited / sufficient] Provide: - Comparison matrix: browser-based vs protocol-based for this scenario - Resource cost: how many browser VUs vs protocol VUs can 1 machine handle - Hybrid strategy: when to use each in the same test suite - Tool recommendation with justification - Architecture diagram of the hybrid test approach - Cost estimate for cloud execution (k6 Grafana Cloud browser VUs)
Real User Monitoring vs Synthetic Testing Gap Analysis
I have the following Real User Monitoring (RUM) data from [Datadog RUM / New Relic Browser / Dynatrace RUM]: [Paste RUM metrics: LCP, TTFB, error rates by page] And the following synthetic test results from [k6 browser / JMeter]: [Paste synthetic test results] Analyze the gaps: - Where do synthetic results match RUM? Where do they diverge significantly? - What factors explain the divergence? (geographic distribution, device types, network conditions, caching, bot detection) - How to make synthetic tests more representative of real users - Should we adjust our SLAs based on RUM data? - How to use RUM data to design more realistic load test scenarios