Compatibility Testing
What it is
Section titled “What it is”Compatibility testing checks that the software behaves correctly across the environments users actually have: operating systems, browsers, devices, screen sizes, locales and versions. The matrix is the whole game.
browser Chrome Firefox Safari WebView Windows ─── ✓ ✓ – – macOS ─── ✓ ✓ ✓ – iOS ─── – – ✓ ✓ Android ─── ✓ ✓ – ✓
Plus: screen sizes, input methods, locales, app versions.Combinatorial growth is real, so you pick a covering set of combinations rather than every cell.
When to use it / when to avoid it
Section titled “When to use it / when to avoid it”Use it for
- Public web apps where any browser or device may arrive
- Native and mobile apps that target several OS versions
- Regulated or enterprise products with a fixed, documented support matrix
- CSS, fonts, video, WebRTC, file handling — the areas browsers disagree on most
Avoid or reduce it when
- You control the runtime (a kiosk, an embedded device) — test only that target
- You test every cell manually instead of pairing a matrix with automation
- The matrix is undocumented, so nobody knows what “supported” means
- You chase the newest browser while ignoring a large share of real traffic
Frameworks & tools
Section titled “Frameworks & tools”| Tool | Ecosystem | Notes |
|---|---|---|
| BrowserStack | Cloud devices | Real browsers and devices on demand |
| Sauce Labs | Cloud devices | Cross-browser and mobile testing cloud |
| Playwright | JS/TS, Python, Java, .NET | Chromium, Firefox and WebKit engines locally |
| Selenium Grid | Multi | Run tests across remote browsers and nodes |
| LambdaTest | Cloud devices | Selenium/Playwright grid in the cloud |
| Appium | Mobile | Native, hybrid and web apps on iOS/Android |
| responsive design mode | Browsers | Quick viewport and touch emulation |
| Appium Inspector | Mobile | Inspect and drive native mobile app elements |
Quick setup
Section titled “Quick setup”npm install -D @playwright/testnpx playwright install --with-depsnpx playwright test --project=chromium --project=firefox --project=webkitpip install playwrightplaywright installplaywright testgo get github.com/tebeka/selenium<dependency> <groupId>com.saucelabs</groupId> <artifactId>sauce-java</artifactId> <version>1.2.3</version> <scope>test</scope></dependency>dotnet add package Microsoft.Playwright.NUnitpwsh bin/Debug/net8.0/playwright.ps1 installExample
Section titled “Example”import { defineConfig, devices } from '@playwright/test';
export default defineConfig({ projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] } }, { name: 'firefox', use: { ...devices['Desktop Firefox'] } }, { name: 'webkit', use: { ...devices['Desktop Safari'] } }, { name: 'pixel', use: { ...devices['Pixel 7'] } }, { name: 'iphone', use: { ...devices['iPhone 15'] } }, ],});import pytestfrom playwright.sync_api import sync_playwright
@pytest.mark.parametrize("browser", ["chromium", "firefox", "webkit"])def test_home_renders(browser): with sync_playwright() as p: page = getattr(p, browser).launch().new_page() page.goto("http://localhost:4321/") assert page.title()caps := map[string]interface{}{ "browserName": "chrome", "bstack:options": map[string]string{"os": "Windows", "osVersion": "11"},}wd, err := selenium.NewRemote(caps, "https://hub-cloud.browserstack.com/wd/hub")_ = wd_ = errMutableCapabilities caps = new MutableCapabilities();caps.setCapability("browserName", "safari");caps.setCapability("platformName", "macOS 14");WebDriver driver = new RemoteWebDriver(new URL(SauceURL), caps);using Microsoft.Playwright;using Microsoft.Playwright.NUnit;
[TestFixture]public class HomePageTests : PageTest{ [Test] public async Task RendersOnSafari() { await Page.GotoAsync("http://localhost:4321/"); await Expect(Page).ToHaveTitleAsync(new Regex(".+")); }}Anti-patterns & best practices
Section titled “Anti-patterns & best practices”- Define the support matrix explicitly. Publish which OS/browser/device versions you actually support, then test those.
- Automate the matrix, manual-test the edges. Playwright and a cloud grid cover breadth; humans check visual and input nuances.
- Weight by real analytics. Fix the browsers your users have, not the one you use.
- Cover input and locale, not just rendering. Touch, keyboard, RTL and translated strings break differently.
- Test older versions deliberately. The failure is often on the oldest supported version, not the newest.
- Keep device lab images fresh. Stale emulators lie about modern behaviour.
Self-assessment quiz
Section titled “Self-assessment quiz”Self-assessment quiz
Pick one answer per question, then press Check answers.