Progressive Web App (PWA) Testing Guide (2026)
PWAs are web apps with native-like capabilities — install to home screen, offline support, push notifications, background sync. They work across platforms but have platform-specific quirks, especially
PWAs are web apps with native-like capabilities — install to home screen, offline support, push notifications, background sync. They work across platforms but have platform-specific quirks, especially on iOS. Testing them covers web surfaces plus the PWA-specific features.
What to test
Installability
manifest.webmanifestvalid (name, icons, theme, start_url)- Service worker registered
- Served over HTTPS
- Browser's install prompt appears at right moment
- Installed app launches to start_url
Offline
- Critical assets cached on first load
- App loads while offline
- Cached content served during offline
- Background sync queues when offline
- Reconnect triggers sync
Service worker
- Install lifecycle fires
- Activate lifecycle fires
- Fetch handler intercepts appropriate requests
- Cache strategies correct per asset type (cache-first for images, network-first for API)
- SW update flow: new version fires, user prompted to reload
Notifications
- Permission prompt at appropriate moment
- Push subscription registered server-side
- Test push delivery
- Notification click opens app to correct URL
- Notification works with app closed
Background sync
- User triggers action offline → queued
- When online, Sync Manager fires, action completes
- Retry logic on failure
- Status visible to user
Payment / crypto
- Payment request API works (if used)
- Web Authentication (FIDO2) works
- Secure contexts enforced
Platform specifics
#### iOS Safari
- Limited PWA support (no push historically; improving in iOS 16.4+)
- Install via Safari Share → Add to Home Screen
- Limited storage (Safari ITP restricts)
- No background sync
- Notifications supported on iOS 16.4+
#### Android Chrome
- Full PWA support
- Install via browser prompt or browser menu
- All capabilities
#### Samsung Internet / Firefox / Edge
- Varying levels of support
- Test specific features on each
Tools
Lighthouse
Includes PWA audit. Checks manifest, SW, HTTPS, offline, installability.
Workbox
Service worker library by Google. Makes SW writing tractable. Test with Workbox's test utilities.
Chrome DevTools
- Application tab: inspect SW, cache, manifest
- Network throttling to test offline
- Device emulation
Playwright
test('installable PWA', async ({ page }) => {
await page.goto('https://myapp.com');
// Assert manifest
const manifest = await page.evaluate(() =>
document.querySelector('link[rel="manifest"]')?.getAttribute('href'));
expect(manifest).toBeDefined();
// Assert SW registered
const swRegistered = await page.evaluate(() =>
'serviceWorker' in navigator && navigator.serviceWorker.controller !== null);
expect(swRegistered).toBe(true);
});
Offline testing
// Playwright
const context = await browser.newContext({ offline: false });
const page = await context.newPage();
await page.goto('https://myapp.com');
await page.waitForLoadState('networkidle'); // Cache warms
await context.setOffline(true);
await page.reload();
// Assert app still loads from cache
Manifest validation
{
"name": "MyApp",
"short_name": "MyApp",
"start_url": "/",
"display": "standalone",
"icons": [...],
"theme_color": "#34d399"
}
Validator: pwabuilder.com or manifest-validator NPM.
SW update strategy
Always-updated SW:
self.addEventListener('activate', (event) => {
event.waitUntil(self.clients.claim());
});
Prompted update:
self.skipWaiting();
// In page: listen for controllerchange, prompt user to reload
Test: load page, deploy new SW, reload — does correct version load? Is update announcement shown?
How SUSA tests PWAs
SUSA drives PWAs as web apps via Playwright. Detects and reports:
- Manifest issues
- SW registration
- Offline behavior (via network offline mode)
- Installability hints
susatest-agent test https://pwa.myapp.com --persona curious --steps 200
Common bugs
- SW caches old API response indefinitely — user sees stale data forever
- Manifest missing icon sizes — install prompt never appears
- SW registered but not updating — skipWaiting / clientsClaim not called
- Cache strategy wrong — API cached cache-first, data always stale
- iOS notification permission silently denied — requires user gesture in iOS
PWAs are web first, install-capable second. Test the web properly; layer PWA-specific tests on top.
Test Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free