How to Test Camera Access in Mobile Apps (Complete Guide)

Camera access is a common mobile feature — profile photos, QR codes, document capture, AR, video. It is also a common source of UX failures, privacy issues, and platform-specific edge cases. This guid

May 26, 2026 · 3 min read · How-To Guides

Camera access is a common mobile feature — profile photos, QR codes, document capture, AR, video. It is also a common source of UX failures, privacy issues, and platform-specific edge cases. This guide covers the test matrix.

What to test

Permission flow

  1. Camera permission requested at the right moment (on feature use, not at launch)
  2. Permission rationale clear (what the camera is for)
  3. Deny → feature gracefully unavailable
  4. Deny-twice → settings deep link offered
  5. Grant → camera available within 1 second
  6. Revoke in settings → app detects on next use

Camera UI

  1. Preview renders without delay after permission grant
  2. Preview orientation correct (portrait / landscape)
  3. Switch front / back camera
  4. Zoom functional (pinch and slider)
  5. Focus tap-to-focus functional
  6. Flash toggle (off / on / auto)
  7. Timer / self-timer (if offered)
  8. Grid lines (if offered)

Capture

  1. Shutter button captures an image within 500ms
  2. Haptic / sound feedback on capture
  3. Captured photo visible in preview
  4. Retake option before confirming
  5. Confirm commits photo (saves / uploads / passes to next step)

Video

  1. Video record button toggles start/stop
  2. Recording indicator visible
  3. Duration visible
  4. Background / foreground mid-recording does not corrupt file
  5. Call interrupting → pause or save, not crash
  6. Storage full → graceful error, not silent failure

Post-capture processing

  1. Image compression applied (not storing 20MB originals)
  2. EXIF data stripped if privacy-sensitive (location)
  3. Correct file format saved (JPEG / HEIC / PNG per context)
  4. Thumbnails generated for preview lists

QR / barcode scanning

  1. QR in frame is detected within 2 seconds
  2. Multiple QRs in frame → user picks or first-detected
  3. Malformed QR → handled gracefully (no crash)
  4. QR containing malicious URL → validated before opening
  5. Low-light QR → detected or clear "too dark" message

Document capture

  1. Auto-edge detection (if offered)
  2. Manual crop available
  3. Perspective correction (dewarp)
  4. Multi-page stitching
  5. OCR (if offered) processes and returns text

AR

  1. World tracking stable
  2. Plane detection works on varied surfaces
  3. Performance acceptable on mid-tier devices
  4. Low-light fallback behavior
  5. Overheat handling (reduce quality, warn user)

Edge cases

  1. App backgrounded mid-capture → resumes or saves
  2. Call interrupts → camera pauses, resumes on return
  3. Another camera-using app in background → appropriate handling
  4. Screenshot during camera preview → works, does not crash
  5. Rotation during capture → image orientation correct
  6. Device overheat → camera throttles or stops with clear message

Accessibility

  1. Shutter button reachable with assistive tech
  2. Camera feature usable with screen magnification
  3. Voiceover announces capture
  4. Alternative to camera (file picker) offered where appropriate

Security / privacy

  1. Camera only active when feature is active (iOS green dot, Android indicator)
  2. Captured images not uploaded until user confirms
  3. Photos saved in app-specific dir, not public gallery (unless user opts in)
  4. No photos accessible to other apps
  5. User can delete captured photos from within app
  6. Background capture attempts blocked (iOS / Android enforce this at OS level)

Manual testing

Real device only. Emulator cameras are simulated images; you will not catch real hardware bugs. Test in:

Automated testing

Camera automation is limited — the OS does not allow programmatic camera feeds. What you can automate:

Android


// Grant permission
GrantPermissionRule.grant(Manifest.permission.CAMERA)

// Launch camera activity, assert preview surface exists
onView(withId(R.id.camera_preview)).check(matches(isDisplayed()))

iOS (StoreKit / test mode)

Inject a test camera mock that returns a known image on capture. Validate the downstream pipeline.

How SUSA tests camera flows

SUSA detects camera-requiring screens and drives through permission + UI interactions. It cannot simulate actual camera input (hardware constraint). What it does verify:


susatest-agent test cameraapp.apk --persona adversarial --steps 100

Common production bugs

  1. Camera permission requested at launch — users reject without understanding the use
  2. Preview does not render on permission grant — needs lifecycle kick to re-initialize
  3. EXIF location leaked on shared photos
  4. Camera stays active after feature exit — iOS shows green dot, user loses trust
  5. Low-light capture produces black image — HDR / ISO not configured

Camera code is surprisingly fragile. Real-device testing every release, SUSA for permission regression, dedicated manual pass for capture quality.

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