Testing guides

Testing a mobile app: files, networks and the device

Phones hand your app files in formats and shapes a desktop rarely does, suspend it without warning, and move it between networks mid-request. This guide covers the parts that differ, with files and live endpoints to test each one.

1. What the picker hands you

Not a file path

Android's document picker returns a content:// URI, and since Android 10 apps cannot read most shared storage by path. Read through the URI; never assume a path exists.

Limited photo access

Since iOS 14 a user can share only selected photos. Test with access limited to a few images, and with access denied, not just with full access.

Names and types you did not expect

Shared files can arrive with no extension, a misleading one, or a Unicode name. Decide by the bytes. Check a file's real type.

PNG with no extension · Filename edge cases

2. Photos

CaseWhat goes wrongTest with
HEIC from an iPhone cameraThe default iPhone format since iOS 11. Depending on how it is picked, the app gets HEIC or a converted JPEG, and a backend expecting JPEG rejects the rest.Photos taken on a real iPhone, picked through each path your app offers
EXIF orientationThe image is stored unrotated with its orientation in metadata. Strip the metadata without applying it and the photo appears sideways.A photo taken with the phone held on its side
Very large imagesDecoding a full-resolution photo to show a thumbnail runs out of memory on older phones.8000 x 8000 PNG
Damaged or disguised imagesA crash in the image decoder takes the app down with it.Truncated PNG · Executable named .jpg
Animated and transparent imagesA GIF shown as a still, or transparency drawn as black.Animated GIF · Alpha gradient

The HEIC and EXIF cases need a real phone. Files generated by this site cannot stand in for them honestly, so take the photos on the devices you support and keep them as fixtures.

3. Uploads and downloads that outlive the screen

Backgrounded mid-transfer

Start a large upload, switch apps, lock the phone. The OS suspends the app shortly after; only the platform's background transfer service keeps the request alive.

Large test files

Network changes

Walk out of Wi-Fi range during a download. The connection breaks and a new one starts on cellular: the app should resume or restart, not show a half file as complete.

A download cut short

This endpoint promises a full Content-Length and stops half way. The app must treat it as a failure.

/truncate

Low storage

Fill the device almost to full and download. The error should say there is no space, and no broken partial file should be left behind.

4. Slow, flaky and dropped connections

Throttle the device (Network Link Conditioner on iOS, the emulator's network settings on Android), then point the app at endpoints that misbehave on purpose.

EndpointBehaviourWhat to check
/delay?ms=5000Waits before the first byteA spinner, a timeout, and a way to cancel
/slow?size=1mb&bps=20000Starts at once, then tricklesProgress that moves, and no timeout while bytes still arrive
/flaky?rate=30Fails about 30% of requests with 503Retries with backoff, not a retry storm
/jitter?min=100&max=3000Random latencyResponses arriving out of order are handled in order
/api/productsPaginated, deterministic recordsInfinite scroll that stops at the last page and never duplicates

More endpoints, including status codes on demand, are on the mock API page.

5. The device itself

Large text

Set the largest text size (Dynamic Type on iOS, font scale on Android). Labels that overflow or truncate the one word that matters are the usual finding.

Right-to-left and long words

Switch to Arabic or Hebrew and try German compounds. Layouts that assume left-to-right or short words break.

Test strings

Time zones and clocks

Change the time zone, and the time, while the app is open. Scheduled reminders and "today" logic are where it shows.

Dates and times

Questions

How do I test a mobile app on a slow or unreliable network?

Throttle the device and use endpoints that misbehave on purpose: /delay, /slow, /flaky and /truncate above.

Why do iPhone photos fail on my server?

Often they are HEIC, the iPhone camera's default. Test with real iPhone photos and decide what you convert.

Why are uploaded photos rotated sideways?

The rotation is stored in EXIF metadata. Apply it before stripping the metadata.

What happens to an upload when the user leaves the app?

The OS suspends the app; long transfers need the platform's background transfer service.

Keep going

Mock API Upload testing → Web app testing →

More from Learning

Guides and references for test data, file handling and AI evals. All free, no sign-up. See the full hub.

Synthetic data for AI evalsWhat you can download, what you buildRAG test corpusDocuments with extraction trapsJSONL for evalsThe format, and ten ways it breaksMock API for agentsRecords, pagination, failures on demandSafe test dataReserved domains, IPs, numbers & cardsSynthetic PIIFake people that reach nobodyTest card numbersEvery brand, declines, 3D SecureTest phone numbersReserved US, UK and Australian rangesReserved IP addressesDocumentation ranges and SSRF casesExample domains.test, .invalid, example.com, and trapsQA test stringsUnicode, emoji, injection & edge casesFilename compatibilityWhat breaks across Windows, Mac & LinuxFile systemsPOSIX, NTFS, APFS, ext4, SMB, NFS, NASFile signaturesMagic numbers that identify every formatCharacter encodingsUTF-8, UTF-16, BOM & normalizationUpload validationThe checklist, with a file for each checkMIME typesThe right Content-Type for every extensionHTTP status codesEvery code and when you actually see itDates & timesISO 8601, epoch, Excel serials, DSTHTTP headersContent-Type, Disposition, Range, CORSRegex cheat sheetSyntax, flags and ready-made patternsGenerate files (CLI)Make test files on any OSCrypto & certificatesSSL/PEM, hashing, encryptionWeb app testingWhat to test, with a file for each caseDesktop app testingPaths, names, encodings and savingCLI testingArguments, pipes and exit codesLarge file upload testingDefault limits, 413s and exact sizes1 GB test file1 GB and 2 GB, with SHA-25610 GB test fileMake one locally in secondsDownload speed test files10 MB to 2 GB of random data