View all services
Talk to QA Advisor
Browse the Knowledge Hub74 resources
/Test Cases/Android lifecycle and permission test cases

Test cases

Android test cases, for the state lost to process death

Twenty eight cases covering state restore after the system reclaims the process, configuration changes and split screen resize, back stack and predictive back, runtime permission rationale and permanent denial, approximate location, doze and battery restrictions, deep links, scoped storage and TalkBack.

28cases/8coverage types/11state cases/FreeCSV download

All 28 test cases, ready to copy

Free to use and adapt, no sign-up. Download as CSV or Markdown, or copy it straight into your own tooling.

Last updated

28 worked examples

AND-01

Restore state after process death

TypeStatePriorityHigh
Test data
Fill a form, background the app, terminate the process from developer settings, then return
Expected result
Screen and entered values are restored. State held only in memory is gone after process death, which the system performs routinely under memory pressure.
AND-02

Survive a configuration change

TypeStatePriorityHigh
Test data
Rotate the device, change the system font size, and switch to dark mode mid task
Expected result
Activity recreates without losing entered data, in flight requests are not duplicated, and no dialogue is dismissed or duplicated by the recreation.
AND-03

Handle a multi window or split screen resize

TypeCompatibilityPriorityMedium
Test data
Enter split screen and resize the app repeatedly
Expected result
Layout adapts, state persists across each resize, and video or camera surfaces do not break when the window changes size.
AND-04

Navigate the back stack correctly

TypeFunctionalPriorityHigh
Test data
Deep navigation followed by repeated back presses, and gesture based back
Expected result
Back returns through the logical hierarchy and exits at the root, rather than dropping the user out of the app mid flow or looping between screens.
AND-05

Handle a predictive back gesture

TypeCompatibilityPriorityMedium
Test data
Begin a back gesture and cancel it, then complete it, on a screen with unsaved changes
Expected result
Preview reflects the destination, cancelling leaves state untouched, and the unsaved changes prompt still appears rather than being bypassed.
AND-06

Request a runtime permission at the point of need

TypeFunctionalPriorityHigh
Test data
Trigger camera, location and notification permission prompts
Expected result
Each is requested when the feature is used rather than at launch, with an in app rationale explaining why before the system dialogue appears.
AND-07

Remain usable when a permission is denied

TypeNegativePriorityHigh
Test data
Deny each permission and continue using the app
Expected result
Feature degrades with an explanation and the rest of the app works. A denial must not leave a blank screen or a control that silently does nothing.
AND-08

Handle permanent denial correctly

TypeNegativePriorityHigh
Test data
Deny a permission twice so the system stops showing the prompt
Expected result
App detects that the prompt will not appear and routes the user to system settings, rather than calling the request repeatedly with no visible result.
AND-09

Detect a permission revoked while backgrounded

TypeStatePriorityHigh
Test data
Grant a permission, background the app, revoke it in system settings, then return
Expected result
Permission is rechecked on resume rather than assumed, since acting on a cached grant crashes on the first call.
AND-10

Handle a permission revoke that restarts the process

TypeStatePriorityHigh
Test data
Revoke a permission that causes the system to kill the app
Expected result
Next launch starts cleanly with no corrupt state, and any work in progress at the moment of the kill is recoverable or clearly lost.
AND-11

Respect approximate rather than precise location

TypeBoundaryPriorityHigh
Test data
Grant approximate location only to a feature expecting precise
Expected result
Feature works at reduced accuracy or explains why precise location is needed, rather than failing as though location were denied entirely.
AND-12

Handle location granted only while in use

TypeBoundaryPriorityHigh
Test data
Grant while in use, then background the app and expect a location dependent task to continue
Expected result
Background behaviour matches the grant, and any feature requiring background location requests it separately with its own rationale.
AND-13

Handle the notification permission being denied

TypeNegativePriorityHigh
Test data
Deny the notification permission, then trigger events that would notify
Expected result
App does not rely on notifications for a critical flow, and in app alternatives exist for anything the user must not miss.
AND-14

Route notifications through the correct channel

TypeFunctionalPriorityMedium
Test data
Notifications of different types with one channel muted by the user
Expected result
Each uses its own channel with an accurate name, and muting one type does not suppress an unrelated one.
AND-15

Complete background work within system limits

TypeStatePriorityHigh
Test data
Start an upload, background the app, and leave the device idle past the doze threshold
Expected result
Work is scheduled through a mechanism that survives doze and app standby, and completes or resumes rather than being silently killed.
AND-16

Handle battery optimisation restricting the app

TypeNegativePriorityHigh
Test data
Place the app under restricted battery usage, then expect background sync
Expected result
Degradation is detected and explained to the user rather than sync silently never running, which is the most common unexplained complaint on Android.
AND-17

Resume a foreground service correctly

TypeStatePriorityMedium
Test data
A long running foreground task with the app backgrounded, then killed and relaunched
Expected result
Ongoing notification is accurate and dismissible only when appropriate, and relaunching does not start a second instance of the same work.
AND-18

Open a deep link into the correct screen and back stack

TypeStatePriorityHigh
Test data
A deep link opened cold, warm, and while signed out
Expected result
Lands on the target with a sensible back stack in all three, and the destination survives an authentication redirect rather than being lost.
AND-19

Handle an app link the system has not verified

TypeNegativePriorityMedium
Test data
A link when verification has failed or the association file is unreachable
Expected result
Falls back to the browser cleanly rather than showing a chooser on every tap or failing to open at all.
AND-20

Read and write within scoped storage

TypeSecurityPriorityHigh
Test data
Save a file, read a shared media file, and attempt to access another app directory
Expected result
Documented storage locations work, the cross app access is refused, and files intended to survive uninstall are placed accordingly.
AND-21

Handle a file picked through the system picker

TypeCompatibilityPriorityHigh
Test data
A file from cloud storage, from a removable card, and one deleted after selection
Expected result
Each is read through the returned reference rather than an assumed path, and the deleted file produces a clear error rather than a crash.
AND-22

Persist credentials safely across restarts

TypeSecurityPriorityHigh
Test data
Sign in, restart the device, and inspect stored credentials
Expected result
Session survives, credentials are held in encrypted storage rather than plain preferences, and nothing sensitive is written to logs.
AND-23

Clear application data cleanly

TypeStatePriorityHigh
Test data
Clear app data from system settings, then relaunch
Expected result
App starts as a fresh install with no residual state, and no crash results from a missing file or preference the code assumed existed.
AND-24

Handle an incoming call or interruption mid task

TypeStatePriorityHigh
Test data
An incoming call, an alarm and a system dialogue during a form and during media playback
Expected result
Media pauses and resumes, entered data survives, and no request is duplicated by the pause and resume cycle.
AND-25

Behave correctly on the oldest supported API level

TypeCompatibilityPriorityHigh
Test data
Core journeys on the minimum supported Android version and on the newest
Expected result
Every journey completes on both, and any feature relying on a newer API degrades rather than crashing on the older one.
AND-26

Handle low storage and low memory

TypeNegativePriorityHigh
Test data
Fill device storage before a save, and trigger memory pressure during a heavy screen
Expected result
Failures are reported clearly, no corrupt file is written, and the app recovers rather than crash looping on the next launch.
AND-27

Recover from a crash without losing user work

TypeStatePriorityHigh
Test data
Force a crash during an unsaved edit, then relaunch
Expected result
Draft is recoverable, the crash is reported with enough context to diagnose, and relaunch does not immediately crash again.
AND-28

Complete key journeys with TalkBack and large text

TypeAccessibilityPriorityHigh
Test data
TalkBack enabled at the largest font scale and with display size increased
Expected result
Every control is reachable and labelled, focus order is logical, nothing is clipped at the largest scale, and permission rationales are announced.

What goes in each field

ID

Required

Stable identifier, prefixed by module.

Test case

Required

What is being verified, in one line.

Type

Functional, negative, boundary, security, state, performance, accessibility or compatibility. Use it to check coverage is spread rather than clustered on the happy path.

Priority

Risk based. Anything that loses user input, crashes on restore, or leaves the app unusable after a permission decision is High. Background execution failures are High because the user never sees the cause.

Test data

The specific values, including the invalid and boundary ones.

Expected result

Required

The precise observable outcome, including message text where the wording itself is the requirement.

How To Use This

Kill the process from developer settings

Backgrounding and returning is not the same as process death. These four conditions are what Android actually does to your app in the field.

Terminate the process, then return

The system does this routinely under memory pressure. Anything held only in memory is gone, and the user comes back to a half filled form that has reset itself.

Deny the permission twice

After the second denial the system stops showing the prompt entirely. An app that keeps calling the request now has a button that visibly does nothing.

Revoke the permission while backgrounded

Then return to the app. Acting on a cached grant crashes on the first call, and the permission has to be rechecked on resume rather than remembered.

Restrict battery usage, then wait

Background sync silently never runs. This is the single most common unexplained Android complaint, and the app usually gives the user no way to discover why.

What Most Sets Miss

Why Android defects look like data loss

Process death is the case that separates a robust Android app from a fragile one, and it is routinely confused with backgrounding. Backgrounding keeps the process alive and everything in memory survives. Process death reclaims the whole process while the app is not visible, then recreates the activity when the user returns, and anything that was not written to persistent state is gone. The system does this constantly under memory pressure, so it is normal rather than exceptional, and the user experiences it as a form that emptied itself for no reason. Testing it requires deliberately terminating the process rather than pressing home.

The permission model has more states than granted and denied, and the extra ones are where apps get stuck. A second denial means the system will never show that prompt again, so an app that responds by calling the request repeatedly presents a control that does nothing at all. A permission revoked in system settings while the app is backgrounded invalidates any cached grant, so the permission must be rechecked on resume rather than remembered. And location now has gradations, so an app expecting precise coordinates needs to work sensibly when it is given approximate ones instead.

Background execution is where Android differs most from what developers expect. Doze, app standby and battery restrictions will stop scheduled work, and they do it silently. An app that relies on background sync without using a mechanism designed to survive those states will simply never sync for a subset of users, who will report that the app does not update and will be told to reinstall. Detecting the restriction and telling the user is the difference between a support ticket and a one star review.

Finally, the ordinary lifecycle events that get skipped in testing because they feel trivial. A rotation recreates the activity and can duplicate an in flight request. An incoming call interrupts media and a form. Clearing app data from settings must produce a genuinely fresh start rather than a crash on a missing preference. And a deep link needs to work cold, warm, and while signed out, with the destination surviving the authentication redirect rather than dumping the user on a home screen.

Suggest an improvement

Testing an Android app?

QAble tests Android apps on real devices across API levels, including process death and restore, the full permission model, background execution limits and accessibility.

Android app testing services

More test case sets

View all

Test cases for a login page

Test cases
25 cases across functional, negative, boundary, security, session and accessibility paths, including account enumeration and lockout.

Test cases for a registration form

Test cases
28 cases covering validation, duplicate accounts, email verification, password rules and the enumeration leak most signup forms ship with.

Test cases for search functionality

Test cases
28 cases across relevance, partial and fuzzy matching, filters, pagination, empty states, injection attempts and performance under load.

Test cases for a shopping cart

Test cases
27 cases on quantity limits, price recalculation, stock changes, coupon stacking, guest to account merge and cart persistence.

Test cases for checkout and payment

Test cases
30 cases including 3D Secure, declines, timeouts, duplicate charges, idempotency, refunds and partial captures.

Test cases for file upload

Test cases
28 cases on size and type limits, spoofed content types, malicious filenames, progress, resume, virus scanning and storage limits.

Test cases for forgot password

Test cases
26 cases on reset token expiry, single use enforcement, session invalidation and the enumeration and rate limit gaps that are routine here.

Test cases for OTP verification

Test cases
26 cases on expiry, resend throttling, attempt limits, code reuse, delivery failure and the brute force window teams forget to close.

Test cases for user roles and permissions

Test cases
26 cases on horizontal and vertical privilege checks, direct object access, role changes mid-session and permission inheritance.

Test cases for form validation

Test cases
27 rules-based cases on required fields, length and numeric boundaries, client and server parity, hidden field tampering and error accessibility.

Test cases for a date picker

Test cases
26 cases on timezone shifts, ambiguous day and month order, impossible dates, min and max limits, leap years and keyboard operation.

Test cases for pagination

Test cases
24 cases on ordering stability, records changing mid-session, page size caps, deep offset cost, permission-filtered totals and state restore.

Test cases for push notifications

Test cases
26 cases on app states, deep link routing, token release on sign out, lock screen privacy, preferences, provider failures and platform differences.

Test cases for reports and data export

Test cases
25 cases on permission filtering in the file, spreadsheet formula injection, encoding, typed numbers and dates, row limits and audit logging.

Test cases for a chatbot

Test cases
28 cases on paraphrased intents, context, fallback loops, human handoff, policy grounding, prompt injection and data scoping.

Test cases for net banking transactions

Test cases
28 cases on duplicate debits from a retried request, concurrent transfers against one balance, daily limits across channels, beneficiary cooling periods, second factor binding and reconciliation.

Test cases for wallet and UPI payments

Test cases
28 cases on payments that time out with no response, idempotency on retry, racing balances, caps across devices, collect request fraud, mandates and refunds.

Test cases for insurance claim submission

Test cases
28 cases on coverage at the date of loss, waiting periods, deductibles and sub limits, exclusions and riders, duplicate claims and settlement reconciliation.

Test cases for patient records in an EHR

Test cases
28 cases on duplicate detection and merge, wrong patient entry, units of measure, allergy and interaction alerting, break glass access and audit of reads.

Test cases for CRM lead management

Test cases
28 cases on duplicate leads under concurrency, routing and the unrouted fallback, round robin races, territory visibility, conversion and bulk import.

Test cases for an ERP purchase order

Test cases
28 cases on approval thresholds, amendments that must reset approval, budget commitment races, over receipt tolerance, three-way match and duplicate invoices.

Test cases for OTT video playback

Test cases
28 cases on bitrate recovery after a dip, DRM renewal mid stream, concurrent stream limits and leaked slots, resume conflicts, ad cue points and offline expiry.

Test cases for game level progression

Test cases
28 cases on save corruption during a crash write, cloud save conflicts, offline queue replay, unlock gating, currency exploits and purchase restore.

Test cases for a REST API

Test cases
28 cases on status code correctness, cross tenant resource access, mass assignment, idempotent retries, cursor pagination, rate limits and contract drift.

Test cases for SSO and social login

Test cases
28 cases on linking an account on an unverified email, state and code replay, redirect allow lists, token signature and issuer, deprovisioning and session rotation.

Test cases for subscription and billing

Test cases
28 cases on mid cycle proration, duplicate and out of order webhooks, renewal double charges, dunning and grace, trials, coupons, metered usage and tax.

Test cases for data tables, filters and sorting

Test cases
28 cases on unstable sorts across pages, filters that must reset pagination, selection surviving a filter change, bulk action scope and export fidelity.

Test cases for session timeout and concurrent login

Test cases
28 cases on tokens that survive sign out, refresh token reuse, idle against absolute lifetime, multi tab expiry, session limits and remote revocation.

Test cases for a multi step form wizard

Test cases
28 cases on values lost to back navigation, refresh and session expiry, step skipping, server side revalidation, duplicate submission and conditional branches.

Test cases for email verification

Test cases
28 cases on token reuse and expiry, invalidating earlier links, account enumeration, header injection, safe address change and mail scanner prefetching.

Test cases for dashboards and analytics widgets

Test cases
28 cases on reconciling against source rows, widgets that disagree, timezone aggregation, zero baselines, no data shown as zero and permission leaks in aggregates.

Test cases for booking and reservation

Test cases
28 cases on concurrent bookings for the last slot, inventory holds that leak, payment without a booking, cancellation boundaries and channel sync.

Test cases for mobile app install and update

Test cases
28 cases on migration chains across skipped versions, crashes during post upgrade migration, forced update lockouts, deep links and clean reinstall.

Test cases for accessibility (WCAG 2.2 AA)

Test cases
28 cases on keyboard only completion, focus management, live region announcements, contrast, reflow at 320 pixels, target size and screen reader verification.

Test cases for performance and load

Test cases
28 cases on spikes with no ramp, recovery after peak, soak and leak detection, pool exhaustion, cold caches, retry storms and data correctness under load.

Test cases for the OWASP Top 10

Test cases
28 cases on broken access control, mass assignment, injection across every input surface, credential stuffing, session invalidation, SSRF and exposed secrets.

Test cases for cross browser compatibility

Test cases
28 cases on storage that throws in private mode, blocked third party cookies, engine date parsing, mobile viewport units, in app browsers and ad blockers.

Test cases for database and data integrity

Test cases
28 cases on uniqueness under concurrency, lost updates, counter races, orphaned rows, migration and backfill safety, replica lag and verified restores.

Test cases for localisation and multi language support

Test cases
28 cases on text expansion, concatenated sentences, plural rules, locale date parsing, decimal separators, right to left layout, collation and encoding.

Test cases for outbound webhooks

Test cases
28 cases on retry backoff and dead letter stores, one dead consumer degrading the pipeline, payload signing and replay windows, out of order delivery and endpoint SSRF.

Test cases for background jobs and queues

Test cases
28 cases on work outliving the visibility timeout, idempotent handlers, poison messages, priority starvation, scheduler overlap across instances and graceful drain.

Test cases for real time features and websockets

Test cases
28 cases on messages lost in the reconnect gap, half open connections, per channel authorisation, tokens expiring mid connection, backpressure and fanout across instances.

Test cases for file storage and media processing

Test cases
28 cases on signed URL scope and expiry, serving before scanning completes, content type sniffing, metadata stripping, orphaned objects and derivative failures.

Test cases for CSV import and bulk operations

Test cases
28 cases on reruns duplicating successes, delimiters inside quoted fields, byte order marks, leading zeros, ambiguous dates and bulk action scope.

Test cases for feature flags and progressive rollout

Test cases
28 cases on unreachable flag services, unstable bucketing, rollouts that reshuffle users, kill switch latency, server and client mismatch and stale flags.

Test cases for iOS app lifecycle and permissions

Test cases
28 cases on the keychain surviving uninstall, suspended termination, limited photo access, allow once location, app switcher snapshots and biometric invalidation.

Test cases for wearable app sync

Test cases
28 cases on data recorded away from the phone, duplicate records on resync, full buffers, clock drift, health permissions, battery budgets and unworn readings.

Test cases for VR and AR experiences

Test cases
28 cases on the frame rate comfort floor, tracking loss, guardian boundaries, involuntary camera movement, AR anchor drift and spatial data privacy.

Test cases for IoT device pairing and telemetry

Test cases
28 cases on offline buffering and reconnect floods, fleet wide reconnection storms, shared credentials, wrong device clocks and stale queued commands.

Test cases for embedded firmware update

Test cases
28 cases on power loss mid write, automatic rollback and health confirmation, signature and anti rollback checks, staged rollouts and recovery mode.

Test cases for user profile and account settings

Test cases
28 cases on partial saves reported as success, optimistic updates the server rejected, mass assignment through a profile form, avatar content inspection and session invalidation.

Test cases for account deletion and data export

Test cases
28 cases on export links that must be authorised and expiring, deletion cascading to storage, caches, logs and processors, grace periods, legal holds and deadlines.

Test cases for consent and cookie management

Test cases
28 cases on cookies and tracking requests firing before consent, reject parity with accept, tag manager bypass, withdrawal, cached banners and server side forwarding.

Test cases for notification preferences and delivery

Test cases
28 cases on opt outs honoured on one channel and ignored on another, marketing sent as transactional, unsubscribe scope, imports resetting consent and digest timezones.

Test cases for admin impersonation and support access

Test cases
28 cases on actions attributed to the customer instead of the admin, credential exposure, chained and upward impersonation, session expiry and immutable access records.

Test cases for audit logs and activity history

Test cases
28 cases on forged entries through log injection, immutability and tamper detection, actor attribution across impersonation and jobs, retention and legal holds.

Want your Android lifecycle proven, not assumed?

QAble covers functional, state and compatibility paths with ISTQB-certified engineers. Start with a free QA audit of your app.

Talk to QA Advisor