Mobile website testing without a device lab takes two tools: the desktop browser’s responsive mode for layout at every width, and one or two real phones connected to a computer for what emulation cannot copy, such as touch, the on-screen keyboard, the mobile engine and real speed. Then a short set of checks, and a report that names the device.
What responsive mode proves, and what it does not
Every desktop browser can draw a page at a phone’s size. Chrome and Edge call it device mode or device emulation, Firefox calls it Responsive Design Mode (Ctrl+Shift+M, or Cmd+Opt+M on a Mac), and Safari has its own Responsive Design Mode in the Develop menu. They set the viewport width and height and the device pixel ratio, and swap the orientation. Chrome and Firefox also turn mouse input into touch events and can slow the network.
The makers are clear about the limit. Chrome’s device mode documentation asks you to “think of device mode as a first-order approximation of how your page looks and feels on a mobile device”, says “there are some aspects of mobile devices that DevTools will never be able to simulate”, and gives the phone’s CPU as the example. Its advice: “When in doubt, your best bet is to actually run your page on a mobile device.” Apple’s page says its viewport presets “offer a good approximation” and do not represent the exact layout, rendering and behaviour of an actual device, and names three causes: the address bar, the on-screen keyboard and device-specific behaviour for form fields. Firefox asks you not to rely on its network throttling for exact performance measurements.
| Question | Responsive mode | A real phone |
|---|---|---|
| Does the layout hold at each width and breakpoint? | Settles it | Confirms it |
| Is the viewport meta tag present and correct? | Settles it, in the Elements panel | Shows the result |
| Does a control fit 24 by 24 CSS pixels? | Measures it | Shows whether it can be hit |
| Does a hover menu open by touch? | Imitates touch with a mouse | Settles it |
| Does the keyboard cover the field or the Submit button? | Has no on-screen keyboard | Settles it |
| Does it behave the same in Safari on iOS? | Runs the desktop engine | Settles it |
| Is it fast enough? | Throttles the network and CPU roughly | Settles it, on a mid-range phone |
So responsive mode is where layout bugs are found and measured, quickly, at any width. It never proves a page works on a phone. The web application testing guide sets this pass inside the wider responsive section, with the full matrix of widths.
How to test on a real phone without a device lab
A device lab is a shelf of phones. What most teams need is two: the Android phone and the iPhone somebody already owns, ideally one of them a few years old, and a cable. The cross-device testing entry explains how to choose more from analytics once the basics pass.
- Android, from any computer. Turn on USB debugging in Developer options, connect the phone, open
chrome://inspect#devicesin desktop Chrome and click Inspect next to the page. Google’s remote debugging guide adds Toggle Screencast, which shows the phone’s screen inside DevTools and turns clicks into taps. To open a site that runs on your own machine, the local server guide forwards a port over the same cable, withlocalhost:8080set up by default. - iPhone and iPad, with a Mac. Turn on Web Inspector in Settings, then Safari, then Advanced, and connect the device to the Mac by cable or after configuring wireless debugging in Xcode. WebKit’s guide says the device then appears in the Develop menu of Safari on the Mac. The Mac needs Safari’s developer features switched on, which our post on how to inspect element walks through.
- iPhone, with no iPhone. The iOS Simulator that comes with Xcode runs Safari’s mobile engine on a Mac, and WebKit notes that remote inspection is always enabled for simulators. Apple’s responsive mode page suggests it for a more accurate preview. It still runs on a desktop processor, so speed is not a phone’s.
- No Mac, and an iPhone bug. The phone can still open the page, and a screenshot and a screen recording from the phone show the fault. To read the console, a cloud device service that rents time on real phones is the usual answer.
Emulators for Android exist as well, and the mobile app testing entry covers what they and the iOS Simulator leave to physical devices. For a website, a real phone on a cable is quicker to set up than an emulator and settles more.
The checks that matter on a phone
Six checks cover the faults a phone shows most plainly, and each one has a standard or a vendor document behind it. The accessibility criteria below are the same ones the accessibility checklist cites, by number and level.
| Check | What passes | Source |
|---|---|---|
| Viewport meta tag | width=device-width, MDN’s recommended value, with zoom left on | MDN, viewport meta |
| Reflow | No sideways scrolling at 320 CSS pixels wide, except maps, data tables and the like | WCAG 2.2, 1.4.10 Reflow, Level AA |
| Target size | Controls at least 24 by 24 CSS pixels, or spaced as the exceptions allow | WCAG 2.2, 2.5.8 Target Size (Minimum), Level AA |
| Orientation | The page works in portrait and in landscape | WCAG 2.2, 1.3.4 Orientation, Level AA |
| Keyboards | Each field brings up the right keyboard: type="email", type="tel", or inputmode="numeric" for digits | MDN, inputmode |
| Hover | Anything that opens on hover also opens on tap | Checked by hand |
Four of these need a little more than the table says.
The viewport tag comes first. Without it, some mobile browsers lay the page out wider than the screen and shrink it to fit. MDN’s example is a 640px screen showing a page laid out in a virtual viewport of 980px, so a page that looks right in responsive mode arrives tiny on the phone. The same MDN page warns that user-scalable=no prevents people with low vision from reading the page, because they can no longer zoom. The viewport entry covers the tag and the vh and dvh units.
Reflow is a desktop check too. The W3C note on 1.4.10 says 320 CSS pixels equals a viewport of 1280 CSS pixels at 400 percent zoom, so one width covers a small phone and a desktop user who enlarges the page.
The keyboard changes the page. When the on-screen keyboard opens, the visual viewport shrinks and the layout viewport stays the same size, which is how a Send button fixed to the bottom of the screen ends up behind the keys. Only a real phone shows it. While the keyboard is up, check that the focused field stays in view and the form can still be submitted. MDN’s inputmode page also notes that inputmode only changes the keyboard and validates nothing, so the type still matters.
Rotation is a test of state. Turn the phone with a half-filled form on screen. The layout should change, and nothing typed should be lost.
A mobile pass, in order
The order below runs from the cheapest check to the one that needs hardware, so the layout bugs are found before anybody picks up a phone.
- In responsive mode, check the narrowest width the site supports, with 320 CSS pixels as the floor, then each breakpoint and one pixel either side of it. Look for sideways scrolling, cut-off text and overlapping controls.
- Measure the small controls: the close cross, the quantity buttons, the links in the footer. Anything under the target size is measured with its spacing before it is filed.
- Read the head of the page for the viewport tag, and confirm it does not switch zoom off.
- On the Android phone, connected to Chrome, go through the main journey: sign up, search, add to basket, pay, or whatever the site exists for. Keep DevTools open on the console.
- On the iPhone, the same journey in Safari, connected to Safari on a Mac where possible.
- On both, fill every form and watch the keyboard: the right layout of keys, the field still visible, the Submit button reachable.
- Rotate both phones in the middle of a form, and open every hover menu by tapping.
- On the older phone, with mobile data in place of wifi, load the heaviest page and judge whether it is usable.
A pass like this finds the faults a desktop review cannot. The browser differences behind some of them, and why the viewport often settles a report before the browser name does, are the subject of which browser is the wrong cross-browser question.
What a bug report from a phone needs
A bug seen on a phone is hard to reproduce on a laptop, so the report has to carry the conditions with it.
| Field | Where to find it | Why it matters |
|---|---|---|
| Device model | The phone’s settings, under About | Screen size, pixel ratio and speed differ by model |
| Operating system and version | The same settings page | On iOS, Safari’s engine is updated with the system |
| Browser and version | The browser’s own About or Settings page | A bug can live in one browser on the same phone |
| Viewport in CSS pixels | The developer tools over remote debugging, or a viewport-size page opened on the phone | Decides which breakpoint was showing |
| Orientation | The reporter’s own description | The layout changes when the phone turns |
| Console error | The console, over remote debugging, copied as text | Often the cause, and never visible on the phone |
| Screenshot | The phone’s screenshot, with the fault circled | Shows what the words cannot |
A screenshot from a phone is in hardware pixels, so one from a phone with a pixel ratio of three is three times wider than the viewport it shows, which the device pixel ratio entry explains. Give the viewport as a separate figure and the screenshot will not contradict it. For the title, name the area, the failure and the condition, as in “Header: Menu button does nothing on iPhone Safari in portrait”, one of the examples in our post on bug report title examples.
Most people who find a bug on their phone will not plug it into a computer. A feedback widget closes part of that gap. The Notarus widget runs in mobile browsers, and a report filed through it carries the page URL, the browser, the operating system, the device, the screen and the viewport, with a screenshot the reporter marks up on their own screen. What a report can hold depends on capture settings and browser support, and the evidence capture page lists it.