# Test the files your mobile app exports, downloads and shares

> “Export complete” proves nothing about the file. A real Android run opens the CSV the app wrote, checks its rows, shares it through the share sheet and reads a download.

By Jason Nguyen, Founder, Testsy. Published 2026-11-21. https://testsy.dev/blog/test-files-your-mobile-app-exports-and-shares/

## The file nobody opens

An app's Export button writes a file: a CSV of orders, a PDF invoice, a backup. The app says "Export complete", and the test stops there, because the file lives inside the phone, outside the app's screens, where most mobile tests cannot look.

That is exactly where export bugs live: an empty file, a file with only the header, a total in the wrong column, a JSON file that is really an error page. Users find them when they open the file in a spreadsheet or send it to their accountant.

Sharing adds a second hand-over: the phone's share sheet, which belongs to the system, not to your app. It has to open with the right file, and closing it has to return the user to where they were.

## The run

We ran this on an Android 16 phone with our practice app QA Lab:

```text
Open Media & files and tap Export CSV; verify CSV export: orders.csv
· 30 rows, then read the app's file orders.csv and verify its header
is order,customer,status,total with 30 order rows, the first
#1001,Customer 1,Paid,10.50 and the last #1030,Customer 30,Refunded,
300.50. Tap Share CSV file, verify the phone's share sheet opens to
share the file orders.csv, close it without sharing and verify the
app is back on Media & files. Tap Download orders and wait until it
finishes; verify Downloaded: orders.json · 30 orders, then read the
app's file orders.json and verify it lists 30 orders, the first
#1001 for Ava Thompson.
```

The picture at the top of this page shows the app after the export, the phone's share sheet with **orders.csv**, and the download finished. All 12 checks passed in 1 minute 36 seconds.

![The checks. The file checks say what was inside: the header, 30 rows, the first and last rows.](https://testsy.dev/blog/img/export-checks.webp)

The two "read the app's file" checks are the point of the test. The tester read the file the app wrote and reported its contents: the header, 30 data rows from #1001 to #1030, the first and last rows exactly as expected; and in the JSON file, 30 orders with #1001 for Ava Thompson. The app's own message ("30 rows") could have been right with a broken file; these checks could not.

[Recording: The review video of the run.](https://testsy.dev/blog/video/export.mp4)

Open [the run](https://app.testsy.dev/share/mq9PHjA23MgRreb3m9WTIB9ihqWbeVmA) (live until 18 February 2027).

## Writing file checks for your app

- **Name the first and last rows.** A file with 30 rows of the wrong data passes a row count. The first and last rows pin it down.
- **Check the header.** Spreadsheets and import tools rely on column names; a renamed column breaks them silently.
- **Close the share sheet without sharing**, and check where the user lands. Sharing to a real app sends real data; closing proves the sheet opened with the right file.
- **Test what the file must not be.** Our practice app also has a planted broken export that writes an error page instead of a CSV. On the web, a run that opened that file and failed as it should is in [Your coding agent said done](https://testsy.dev/blog/your-coding-agent-said-done-what-it-did-not-check/), and [Test what is inside a downloaded file](https://testsy.dev/blog/test-what-is-inside-a-downloaded-file/) covers CSV, Excel, PDF and ZIP files.

The same text runs on iPhone ([one test for both platforms](https://testsy.dev/blog/one-test-for-iphone-and-android/)).

This post is part of [Mobile release testing for app teams](https://testsy.dev/blog/mobile-release-testing-for-app-teams/).
