DEVELOPER SANDBOX Academy of Mastery
WelcomeBuild · Explore · Create SD
REFERENCE GUIDE

Cross-Device Web Testing

Device testing

FAST PATH

Mac-first testing stack

Use the fastest layer that can answer the question, then move to a more realistic environment only when needed.

Recommended default: manual browser checks + Playwright automation + Safari/Xcode verification + at least one real-device pass before important releases.

1 · Inspect quickly

Use Chrome, Firefox, and Safari responsive tools while building. Check layout, overflow, focus states, touch-sized controls, network requests, and console errors.

2 · Automate engines

Use Playwright Test as the modern default for repeatable Chromium, Firefox, and WebKit coverage. Add mobile device profiles as projects.

3 · Verify Apple

On macOS, use Safari Responsive Design Mode and Xcode Simulator for iPhone/iPad Safari behavior that desktop emulation cannot fully prove.

4 · Check physical devices

Use BrowserSync on the local network to load the same development site on phones, tablets, and extra browsers at the same time.

5 · Release on real hardware

Before a major release, test at least one physical iPhone/iPad and Android device, or use a real-device cloud such as BrowserStack.

WHICH TOOL?

Tool picker

These are complementary tools. The strongest workflow uses several layers instead of expecting one tool to prove everything.

Playwright

Best modern default. Open source. E2E/browser automation across Chromium, Firefox, and WebKit; strong device emulation, traces, parallelism, and CI support.

Cypress

Best for interactive JS/TS test authoring. Open-source runner with excellent local debugging and component testing. WebKit remains experimental, so do not treat it as complete Safari proof.

Selenium

Best for broad enterprise or cross-language needs. Open source, W3C WebDriver based, large ecosystem, Selenium Grid, and modern automatic driver management.

Safari + Xcode

Best Apple-platform check on a Mac. Built into macOS plus free Xcode simulators. Use Web Inspector, Responsive Design Mode, and iOS/iPadOS Simulator.

BrowserSync

Best low-friction local device lab. Open source. Serves or proxies a local site, reloads connected browsers, and can mirror scrolling, clicks, and forms.

Lighthouse

Best quick quality audit. Open source. Performance, accessibility, best-practice, and SEO audits from Chrome DevTools or the CLI.

axe-core

Best automated accessibility layer. Open source. Add checks to Playwright, Selenium/WebDriver, React, or other test workflows; manual accessibility review is still required.

BrowserStack

Best optional real-device cloud. Commercial, not open source. Useful for real iOS/Android hardware, many browser/OS combinations, and testing localhost through a secure tunnel.

BUILD-TIME CHECKS

Manual browser & device checks

Three columns show Use it for → macOS setup/open → best practice.

Do not confuse responsive emulation with real-device testing. Emulation is fast and valuable, but it cannot reproduce every CPU, GPU, keyboard, browser chrome, OS integration, memory, and touch behavior.

Chrome Device Mode

Use it for
Viewport resizing, DPR presets, CPU/network throttling, geolocation, orientation, layout inspection.

Open on Mac
⌥⌘I for DevTools, then toggle the device toolbar. Chrome Device Mode is an approximation, not a real phone.

Best use
Fast first-pass responsive debugging. Follow failures or suspicious behavior with a physical device or simulator.

Firefox Responsive Design Mode

Use it for
Responsive layout in Gecko, viewport size, touch simulation, DPR/device presets, and Firefox-specific CSS behavior.

Open on Mac
⌘⌥M or Firefox → Tools/Browser Tools → Responsive Design Mode.

Best use
Run after Chromium checks so Gecko-specific layout and standards differences are not missed.

Safari Responsive Design Mode

Use it for
WebKit/Safari layout, media queries, pixel ratio, Web Inspector, Apple-platform browser behavior.

Enable on Mac
Safari → Settings → Advanced → Show features for web developers. Enter Responsive Design Mode with ⌃⌘R; Web Inspector with ⌥⌘I.

Best use
Required macOS check for Safari. Use Xcode Simulator or a physical iPhone/iPad when mobile Safari behavior matters.

Xcode Simulator

Use it for
iPhone/iPad Safari in simulated iOS/iPadOS environments, different device sizes, OS versions, and Apple-specific behavior.

Install
Install Xcode from the Mac App Store, launch it once, then add runtimes in Xcode → Settings → Components. Safari can open pages in installed simulators from the Develop menu.

Best use
Closer to iOS than desktop viewport emulation, but still not physical hardware. Keep one real-device pass for release confidence.

REPEATABLE REGRESSION

Automation frameworks

Use automation for behaviors you need to verify repeatedly: navigation, forms, authentication, responsive menus, critical flows, and regressions.

Do not automate every visual detail. Automate stable user outcomes and critical UI states; keep exploratory and visual judgment in manual testing.

Playwright — recommended default

Modern cross-engine E2E testing with a strong TypeScript/JavaScript workflow, automatic waiting, traces, screenshots, network control, projects, and device profiles.

Cypress — interactive JS/TS option

Open-source testing tool with an excellent interactive app, time-travel-style command debugging, network stubbing, E2E testing, and component testing.

Selenium — enterprise & cross-language

Long-lived open-source browser automation built around W3C WebDriver, with language bindings, Selenium Grid, and broad browser/ecosystem support.

BrowserSync — synchronized manual testing

BrowserSync is not an E2E assertion framework. It is an open-source local server/proxy and synchronization tool for testing the same page across several real browsers/devices at once.

TERMINAL + CONFIG

Copy/paste setup & examples

These examples are macOS-friendly and assume a current Node.js project. Install project tooling locally unless there is a strong reason to install it globally.

Playwright — initialize and run
Playwright — cross-engine + mobile projects
Playwright — responsive navigation test
Cypress — install, open, run browsers
Cypress — simple responsive test
Selenium — JavaScript quick start
BrowserSync — static and dynamic sites
Lighthouse — CLI audit
axe-core with Playwright
PERFORMANCE + ACCESSIBILITY

Quality checks beyond layout

Cross-device quality includes more than width. Test performance, input methods, accessibility preferences, network behavior, and failure states.

Lighthouse

Catches quickly
Performance opportunities, accessibility signals, best-practice issues, and SEO basics.

Best implementation
Use Chrome DevTools while developing; use the CLI or CI tooling when you need repeatable audits. Treat scores as signals, not as a substitute for real-user performance data.

axe-core

Catches quickly
Many automatically detectable accessibility violations in rendered UI.

Best implementation
Run axe after important UI states become visible. Pair it with keyboard-only navigation, visible focus checks, zoom/reflow checks, labels, reading order, and manual assistive-technology review.

Network + CPU

Catches quickly
Slow-loading assets, blocking requests, loading-state bugs, timeouts, and code that assumes desktop CPU/network speed.

Best implementation
Throttle network/CPU in Chrome DevTools and test slow-state UI. Real mobile hardware remains the stronger performance check because desktop throttling cannot reproduce every mobile processor/GPU condition.

Touch + user preferences

Catches quickly
Controls too small for touch, hover-only interactions, motion problems, dark/light mode issues, and reduced-motion behavior.

Best implementation
Use browser emulation and Playwright context options for touch/user preferences, then physically use the interface on a touch device. Every important action should remain keyboard accessible.

WHEN EMULATION IS NOT ENOUGH

Real-device strategy

Use real hardware whenever the bug could depend on the operating system, browser chrome, touch, virtual keyboard, device performance, memory, or hardware integration.

Xcode Simulator — free Apple coverage

Free with Xcode on macOS and far more realistic for iOS/iPadOS Safari behavior than simply shrinking a desktop browser window.

Physical iPhone/iPad + Safari Web Inspector

Use a real Apple device for the highest-confidence Safari/touch/keyboard/performance check you can do locally.

Physical devices on the same Wi-Fi

BrowserSync gives a local development URL that other phones/tablets/computers can open, with synchronized reloads and optional mirrored interactions.

Real-device cloud — BrowserStack or equivalent

Use a cloud service when you need device/OS combinations you do not own, remote team access, screenshots/video, or repeatable release checks across real hardware.

MINIMUM COVERAGE

Practical release matrix

Adapt the matrix to your analytics and audience. The goal is representative coverage, not testing every device ever made.

Browser engines

Chromium + Firefox + WebKit/Safari. Add branded Edge/Chrome only when enterprise policies or browser-specific behavior matter.

Responsive widths

Check narrow phone, common phone, tablet, laptop, and wide desktop ranges. Resize continuously too—bugs often appear between named device presets.

Critical UI states

Menus, forms, validation, modals, authentication, empty/loading/error states, keyboard focus, long text, zoom, and content overflow.

User preferences

Light/dark mode, reduced motion, increased text/zoom, keyboard-only use, and touch where applicable.

Slow conditions

Throttle network/CPU, reload uncached, inspect large assets, and make sure loading/error states remain usable.

Real hardware

At least one current iPhone/iPad Safari pass and one Android/Chrome pass for important public releases, using owned devices or a real-device cloud.

BOOKMARK THESE

Downloads & official documentation

Prefer official documentation and current install commands. Tooling changes quickly; old tutorials often preserve obsolete driver, browser, or configuration steps.

Playwright

Install: npm init playwright@latest
Browsers · Projects · Device emulation

Cypress

Install: npm install cypress --save-dev
Launching browsers · Cross-browser testing

Selenium

JS install: npm install selenium-webdriver
JavaScript API · Selenium Manager

Chrome DevTools

Download Chrome · Device Mode docs explain viewport simulation, CPU/network throttling, sensors, and the limitations of desktop emulation.

Firefox Developer Tools

Download Firefox · Responsive Design Mode is built into Firefox and opens on macOS with ⌘⌥M.

Safari Developer Tools

Safari ships with macOS. Enable developer features at Safari → Settings → Advanced → Show features for web developers. Responsive Design Mode.

Xcode Simulator

Xcode is free from the Mac App Store. After first launch, install additional iOS/iPadOS runtimes from Xcode → Settings → Components as needed.

BrowserSync

Preferred project install: npm install browser-sync --save-dev
CLI · Options / Ghost Mode · Gulp integration

Lighthouse

Built into Chrome DevTools. Optional CLI: npm install -g lighthouse. Use it for repeatable performance/accessibility/best-practice/SEO audits.

axe-core

Open-source accessibility engine. Core install: npm install axe-core --save-dev. Playwright integration: npm install -D @axe-core/playwright.

BrowserStack

Commercial real-device/browser service. BrowserStack Local creates a secure tunnel so remote sessions can reach localhost, staging, private networks, or VPN-only environments.

Safari Technology Preview

Optional Apple browser build for checking upcoming Safari/WebKit features before they reach stable Safari. Keep stable Safari in the release matrix as the user-facing baseline.