The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Use k6 browser testing to check a real browser-based user journey and collect frontend performance metrics; use protocol-level tests for most high-volume traffic, or combine both when you need to see a user flow alongside backend load. To start, install k6 and a Chromium-based browser, create a browser scenario, then run it with k6 run browser-script.js.
What you need before writing a browser test
- k6, installed on the machine or test environment where you will run the script.
- A Chromium-based browser. Grafana’s example uses Chrome.
- Basic JavaScript or TypeScript familiarity. Browser operations use asynchronous calls, so you will need
asyncandawait.
The k6 runtime is not Node.js, and compatibility with npm modules can vary. The first-test tutorial recommends using a code editor but does not require a particular editor or prescribe computer hardware. See Grafana’s browser testing documentation and first-test tutorial for installation details and current setup requirements.
Create and run a minimal browser test
You can generate a starting file with k6’s browser template:
k6 new --template browser browser-script.js
k6 run browser-script.js
Or create browser-script.js yourself. This example opens a page, checks that it has a non-empty heading, and closes the page even if navigation or the check fails:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problems#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
import { browser } from 'k6/browser';
import { check } from 'k6';
export const options = {
scenarios: {
ui: {
executor: 'shared-iterations',
options: { browser: { type: 'chromium' } },
},
},
thresholds: {
checks: ['rate==1.0'],
},
};
export default async function () {
const page = await browser.newPage();
try {
await page.goto('https://your-test-environment.example');
const heading = await page.locator('h1').textContent();
check(heading, {
'expected page is shown': (value) => value !== '',
});
} finally {
await page.close();
}
}
Replace the example URL and heading assertion with your own application and a meaningful outcome. For example, a test of a sign-in flow should verify a signed-in state, not merely that the sign-in page loaded. The checks: ['rate==1.0'] threshold is an example that requires all checks to pass; it is not a universal performance target. Set thresholds to match your service objectives and test environment.
Build a user flow with locators
Use page.locator(...) to find and interact with the controls in your flow. Prefer locators over brittle assumptions about timing or element position: they are suited to dynamic pages, including single-page applications where content changes or frames navigate. Add checks for the result a user should see after an action, such as a confirmation message or a destination heading. Grafana documents browser interactions and locators in its interaction guide.
Always close the page
Put await page.close() in a finally block. This releases allocated resources and supports accurate Web Vital calculations, including when a navigation or assertion throws an error. Browser API operations are asynchronous in k6 starting with version 0.52.0; use async/await rather than treating them as synchronous calls. See the current browser API guidance.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Choose browser, protocol, or hybrid testing
| Approach | What it tells you | Best fit |
|---|---|---|
| Browser-level | Whether a user-facing flow works and what browser-visible performance metrics it produces. | Frontend behavior, client-heavy applications, and checks that depend on actual browser interaction. |
| Protocol-level | How backend endpoints behave under request load. | Generating most of the traffic when you need substantial load efficiently. |
| Hybrid | How the application behaves under backend load while a user journey is sampled in a browser. | Combining broad protocol traffic with a smaller browser workload. |
Grafana’s guidance recommends using protocol requests for most generated traffic and fewer browser VUs for browser-level coverage where appropriate. Full browser instances are not automatically the most efficient way to generate large volumes of load. Choose based on the question you need the test to answer, rather than treating browser testing as a replacement for protocol testing. Read the k6 browser overview for Grafana’s discussion of the two approaches.
Recommended Free Tools
Run locally or in Grafana Cloud k6
Run locally
For local development and debugging, run:
k6 run browser-script.js
Review the checks and browser metrics in the command output, then adjust the script or thresholds to reflect the behavior you need to verify.
Run in Grafana Cloud k6
Grafana Cloud k6 supports cloud execution through its interface or CLI. Its results view can show browser-test information, including the 75th percentile of Web Vitals over time. Cloud configuration may include a load zone, test name, and project settings; consult the current Grafana Cloud browser execution documentation for the applicable setup.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Grafana’s current documentation says browser VUs consume 10 times more VU hours than protocol VUs in Grafana Cloud k6. That comparison is specific to Grafana Cloud’s stated usage model; it does not describe local runs or other providers. Account for it when planning cloud test volume.
Read browser metrics without mistaking examples for targets
k6 browser results can include request metrics and Web Vitals such as FCP (First Contentful Paint), LCP (Largest Contentful Paint), CLS (Cumulative Layout Shift), INP (Interaction to Next Paint), and TTFB (Time to First Byte). Grafana’s documentation output demonstrates these metrics, but its displayed sample values are illustrative—not a benchmark or a recommended pass/fail value. Define thresholds from your own service objectives, test environment, and user expectations. Grafana describes browser metrics in its browser testing documentation.
Reliability and measurement practices
- Wait for a meaningful state. Prefer an element, navigation, or other relevant condition over arbitrary sleeps. The recommended practices cover waiting and common sources of unreliable tests.
- Handle consent banners and overlays. A cookie banner, newsletter popup, or chat widget can block the control your test needs. Make the test’s expected banner behavior explicit or use a suitable test environment.
- Account for dynamic elements and input delays. Applications may update or replace elements while the test runs. Use locators and wait for the state you intend to interact with instead of assuming the page is static.
- Keep metrics useful. Avoid unbounded time-series cardinality when adding dynamic labels or values; follow Grafana’s guidance for browser test metrics.
- Treat device presets as emulation. Presets can approximate mobile browser behavior, but they are not measurements from a physical device.
- Know the Cloud limitation. Environment-variable browser customization is unsupported for browser tests running in Grafana Cloud k6; check the current browser options documentation before relying on it.
Docker and Chrome sandboxing
If you run a local browser test in Docker, check the guidance for Grafana’s master-with-browser image before using it. The documented image warns about launching Chrome with no-sandbox; Grafana advises using that configuration only with trustworthy websites and documents a hardened alternative. Do not apply the no-sandbox setting indiscriminately to tests of untrusted sites. See the relevant browser setup documentation before adopting a container command.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Troubleshoot common browser-test failures
| Symptom | Likely cause | What to check |
|---|---|---|
| The browser scenario will not start. | The browser scenario configuration is missing or malformed, or a Chromium-based browser is unavailable in the execution environment. | Confirm the scenario has an executor and options.browser.type is 'chromium'; verify k6 and the browser setup for that environment. |
| An operation returns before the page is ready or the script behaves as if it is synchronous. | Browser operations are asynchronous. | Use an async default function and await browser calls. The browser API is asynchronous starting in k6 v0.52.0. |
| A click or locator fails intermittently. | The page is dynamic, the target element changed, or a banner or overlay is blocking it. | Use a locator, wait for the intended state, and account for consent banners, popups, and chat widgets. Avoid arbitrary fixed sleeps when a state-based wait is available. |
| Web Vital results look inaccurate or resources accumulate. | The page was not closed reliably after a run. | Close it in a finally block so cleanup occurs on both success and failure. |
| A cloud browser test does not honor environment-variable customization. | That customization is unsupported for browser tests running in Grafana Cloud k6. | Use a supported browser option instead and verify current Cloud documentation for the setting. |
| A Docker browser run raises a Chrome sandbox concern. | The image’s documented launch configuration may use no-sandbox. |
Follow Grafana’s warning: use it only with trustworthy websites, or use the documented hardened alternative. |
Or skip the browser setup
If your goal is to capture a page rather than exercise an interactive k6 user journey, ScreenshotNeo provides a one-request website screenshot API. It returns PNG, JPEG, WebP, or PDF and also offers an MCP server for AI agents. It is not a replacement for k6 load testing or browser-flow assertions.
For example, this cURL request captures a page as WebP (replace the URL with your target):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Cookie and consent banners, newsletter popups, and chat widgets are removed before capture; each of those cleanup steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. AI agents can use its MCP server tools to take screenshots, get page information, and capture PDFs. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Sign up for ScreenshotNeo’s free plan and get 1,000 screenshots a month with no card.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Frequently Asked Questions
Can I use TypeScript for a k6 browser test?
The first-test tutorial assumes basic JavaScript or TypeScript familiarity; use the current k6 guidance for the supported script setup.
Does a browser test replace a load test?
No. Browser testing checks user-visible behavior and frontend metrics; protocol traffic is generally better suited to generating most high-volume load.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.

