Responsive Testing
Responsive testing checks that a web page keeps its content and functions usable at every viewport size, orientation and zoom level the product supports. Its CSS switches the layout at breakpoints, for example one column of products on a phone, two on a tablet and four on a laptop. You resize, rotate and zoom, and check that nothing is cut off, covered, unreachable or lost.
It builds on media queries from the lesson on CSS basics for testers and on the device toolbar from the lesson on browser DevTools.
Why it matters
A layout that works only at the widths in the design fails real people: a pay button hidden under a sticky footer, a menu that will not open in landscape, a price cut in half. When the user cannot finish the task, that is a functional failure, not a cosmetic one.
WCAG 2.2, the W3C accessibility standard, makes part of this testable: reflow at 320 CSS pixels (success criterion 1.4.10), text that resizes to 200% (1.4.4) and no lock to one orientation (1.3.4).
Viewports and breakpoints: choosing the widths
The viewport is the area the page is laid out in, in CSS pixels. Mobile browsers size it from <meta name="viewport" content="width=device-width, initial-scale=1">; without that tag they lay the page out at a desktop-like width and shrink it. A breakpoint is a width, sometimes a height, where a media query (CSS rules that apply only while a condition such as min-width: 600px is true) switches the layout; between breakpoints a fluid layout stretches and shrinks with the viewport.
Each breakpoint is the boundary between two layouts, so test the last width of one layout and the first width of the next: a media query that is one pixel off fails only at those two widths. The lesson on boundary value analysis explains the technique in full. Take the breakpoints from the design system or from the CSS itself (search it for @media; the CSS Formatter makes a minified stylesheet readable), not from a list of popular phones, because breakpoints are where the layout changes.
- The smallest supported width, usually 320 CSS pixels.
- Both sides of each breakpoint: 599 and 600 for
min-width: 600px, but 600 and 601 formax-width: 600px. - A slow drag through each range: fluid layouts also break between breakpoints, mostly near the narrow end.
- A very wide screen, where content stops at its maximum width, and short heights such as a phone in landscape.
Orientation, zoom and reflow
Rotating a phone swaps the viewport's width and height: 360 CSS pixels wide in portrait can become 740 in landscape and cross a breakpoint mid-task. WCAG criterion 1.3.4 requires that content is not restricted to one orientation unless a specific one is essential.
Browser zoom on a computer enlarges each CSS pixel, so the viewport narrows: a 1280-pixel window is 640 CSS pixels wide at 200% and 320 at 400%, and fires the same media queries as a small screen. Criterion 1.4.4 requires text to resize to 200% without loss of content or function; 1.4.10 requires content at 320 CSS pixels to work without two-way scrolling, except parts such as data tables and maps. Pinch zoom on a phone only magnifies, without a new layout, so it does not test reflow.
- Rotate mid-task: typed text, filters, scroll position and open dialogs must survive.
- Enlarge only the text with the browser's font-size setting to expose fixed-height boxes that clip their labels.
- Report
user-scalable=no, or amaximum-scalebelow 2 such asmaximum-scale=1, in the viewport tag: they try to stop people enlarging the page, which fails 1.4.4.
Worked example: a test plan for a product list
A shop's product list shows one column and a menu button below 600 CSS pixels, two columns from 600, four columns and a full menu bar from 1024, and content at most 1200 wide. The CSS is mobile-first (@media (min-width: 600px), @media (min-width: 1024px)), so 600 and 1024 start the new layouts.
The tester sweeps the plan below in the device toolbar, then repeats the add-to-basket flow on a real Android phone and iPhone. Two defects turn up: from 600 to 680 pixels the "Add to basket" label is cut off, and rotating the phone clears the selected filters; the report for the second follows the plan.
- 320 × 640: minimum and reflow width; one column, no sideways scrolling.
- 599 and 600, 1023 and 1024, plus a slow drag through each range.
- 1920 × 1080: content stops at 1200 pixels, centred.
- 360 × 740 rotated to 740 × 360 while filtering: two columns, filters and scroll position kept.
- A 1280-pixel window at 200% and 400%: two columns, then one, with every function reachable.
Planned test widths
Axis shortened between 1300 and 1850: not to scale
- 320–5991 column · menu button
- 600–10232 columns · menu button
- ≥ 10244 columns · full menu bar
- 1320 px smallest supported widthWCAG 1.4.10 Reflow: no sideways scrolling
- 2599 | 600 breakpoint 1: test both sides1 column → 2 columns
- 31023 | 1024 breakpoint 2: test both sidesmenu button → full menu bar
- 41920 px very wide screencontent stops at 1200 and is centred
Same page: zoom on a 1280 px window, a rotated phone
Axis shortened between 1300 and 1850: not to scale
- 320–5991 column · menu button
- 600–10232 columns · menu button
- ≥ 10244 columns · full menu bar
- 1100% laptop window at 100%4 columns
- 2200% same window at 200%640 CSS px: 2 columns
- 3400% same window at 400%320 CSS px: 1 column, reflow check
- 4360 × 740 phone in portrait1 column, filters selected
- 5740 × 360 same phone in landscapecrosses 600: 2 columns, but the filters were clearedFail
Widths in CSS pixels. The phone is an example with a 360 × 740 viewport.
Title: Product list: selected filters are cleared after rotating the phone
Where: /products, build 3.8.0 on staging
Device: real Android phone, Chrome; also in the device toolbar, 360 x 740 to 740 x 360
Steps: 1. Open the product list in portrait (viewport 360 x 740)
2. Select the filters "Size 42" and "Colour: black"
3. Rotate the phone to landscape (viewport 740 x 360)
Expected: 2-column layout, both filters still selected, list still filtered
Actual: 2-column layout, filters cleared, full unfiltered list shown
Notes: Also happens when a desktop window is resized across 600 px, so it
follows the breakpoint, not the device. Nothing is lost while the
width stays on one side of 600.What the device toolbar can and cannot tell you
The device toolbar is the right tool for that sweep: type exact sizes or drag through a range, rotate, and in Chrome show the media queries as bars above the page. A device preset also sends that phone's user agent, which you can read in the User-Agent Parser. It is still a desktop browser imitating a phone, so confirm layout-critical flows on real devices; it does not reproduce:
- The phone's engine: an iPhone preset in Chrome does not render with Safari's WebKit.
- Mobile browser bars that hide and reappear:
100vhis the height with them hidden, so full-height panels can lose their bottom edge. - The on-screen keyboard, which can hide the focused field or a fixed submit button.
- A finger's imprecision: small or crowded targets that fail WCAG 2.5.8 (24 × 24 CSS pixels or enough spacing) feel fine with a mouse.
- The phone's text-size settings and its real performance: CPU and network throttling only approximate it. The toolbar's own zoom only scales the preview, not the CSS viewport.
Typical responsive defects
- Horizontal scrolling: a fixed width, a long unbroken word or URL, a wide table or an image without a maximum width.
- Covered or unreachable content: a sticky header or footer over a field or button, or a dialog taller than a short viewport that cannot scroll.
- Missing functions: an action hidden with
display: noneon mobile with no other route, or a menu that will not open or scroll in landscape. - Clipped text and lost state: labels cut off by longer translations or enlarged text; input or filters reset after a rotation, often because the page swaps components at a breakpoint.
- Query gaps and overlaps:
max-width: 767pxwithmin-width: 768pxmatches neither rule at fractional widths such as 767.5 (some high-density screens and zoom levels);max-width: 768pxwithmin-width: 768pxapplies both at 768. - Stretched, cropped or blurry images, and in right-to-left pages a mobile menu that slides in from the wrong side.
Try it: Lorem Ipsum Generator Try it: Multilingual Test Data Generator
Common mistakes
- Choosing widths from a device list instead of testing both sides of the product's breakpoints and dragging through the ranges between them.
- Treating a pass in the device toolbar as proof that the page works on phones.
- Checking the layout only after the page loads, never rotating, resizing or zooming mid-task.
- Accepting sideways scrolling at 320 CSS pixels or blocked zoom as cosmetic; both are accessibility failures.
The QA perspective
In refinement or design review, ask for the breakpoints, the smallest supported width and what each layout must contain. A function that disappears on phones should be a product decision, not an accident.
In bug reports, give the range where the failure starts and stops (fails 600 to 680, fine at 681), the orientation, zoom level, browser, real device or emulation, and a screenshot at a failing width. Retest fixes on both sides of the nearest breakpoint: a fix often moves the problem into the next range.
Practice exercise
Plan responsive checks for a booking form
A hotel booking page uses the CSS below. The form has two columns from 720 CSS pixels; the price summary is a bar fixed to the bottom of the screen until 1100 pixels, where it becomes a side column. The smallest supported width is 320.
Write the test widths with reasons, one rotation and two zoom checks, the defects to look for first and what to confirm on a real phone.
.form { display: grid; grid-template-columns: 1fr; gap: 16px; }
.summary { position: fixed; bottom: 0; left: 0; right: 0; }
@media (min-width: 720px) {
.form { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
.page { display: grid; grid-template-columns: 2fr 1fr; }
.summary { position: static; }
}- List the breakpoints and the layout of each range.
- Choose the widths, then add the rotation and zoom checks.
- Name the likely defects and what the device toolbar cannot settle.
Show the model answer
Ranges: 320 to 719, one column with the bar; 720 to 1099, two columns with the bar; 1100 and above, two form columns beside the summary column. Widths: 320 (minimum and reflow); 719 and 720 (both sides of the form breakpoint); 1099 and 1100 (both sides of the summary breakpoint: at 1100 the form shrinks to two thirds of the page, so its columns become almost as narrow as at 720); a slow drag through each range; and 1920, because the CSS sets no maximum width and lines grow very long.
Rotation: a 360 × 740 phone turned to 740 × 360 crosses 720, so two columns appear while the fixed bar takes part of a viewport only 360 pixels tall; entered dates and names must survive. Zoom: a 1280-pixel window at 200% (640, one column with the bar) and 400% (320, reflow without sideways scrolling; the viewport height shrinks by the same factor, so check that the bar does not cover most of the screen).
Look first for the bar covering the last field or the booking button, labels clipped just above 720 and input lost on rotation. On a real phone, confirm the bar with the keyboard open and with browser bars shown and hidden, and the tap target sizes.
Frequently asked questions
Which screen sizes should I test?
Start from the product's breakpoints and smallest supported width, not from a device list: both sides of every breakpoint, 320 CSS pixels, a drag through each range and one very wide screen. Data about your users' devices then decides which real devices you confirm on, which is the subject of cross-browser and cross-device testing.
Is responsive testing the same as mobile testing?
No. Responsive testing checks how one web page adapts to sizes, orientations and zoom levels, and much of it can be done on a computer. Mobile testing also covers native apps, device hardware, networks, interruptions, installation and updates.
Is zooming in the same as testing a smaller screen?
For layout, mostly yes: browser zoom narrows the viewport in CSS pixels and triggers the same media queries. It does not bring touch, the on-screen keyboard or the mobile browser interface, so it checks resize and reflow, not the phone experience.
References
- Web Content Accessibility Guidelines (WCAG) 2.2The W3C Recommendation that defines the testable success criteria for accessible web content, organised under four principles and three conformance levels (A, AA, AAA).
- Understanding WCAG 2.2The informative explanation of each WCAG 2.2 guideline and success criterion: intent, who benefits, examples and techniques (not normative).
- Responsive web design — MDNResponsive design in practice: flexible layouts with flexbox and grid, media queries and the viewport meta tag, so one page works across screen sizes.
- Responsive web design basicsThe basics of responsive design: set the viewport, size content to fit it, and use media queries with breakpoints chosen by the content rather than by device.
Practise with Mutqan tools
Generate boundary values (min-1, min, min+1, nominal, max-1, max, max+1) for numeric and length constraints.
Beautify CSS with one declaration per line, indentation and sorted output options.
Parse User-Agent strings into browser, version, engine, OS, device type and bot detection.
Generate placeholder text as paragraphs, sentences or words — Latin, Arabic or Hindi.
Generate the same records in multiple languages (English, Arabic, Hindi, and more) to test i18n and RTL/LTR mixing.
Generate high-level test scenarios covering functional, negative, security, usability and compatibility angles for a feature.
Go deeper
Your progress on this topic
Not started
Mark the topic complete when you have studied it and done the exercise.
Sign in to track your progress
Mark topics complete, continue where you left off and unlock specialisation exams.