---
title: "Verify Android upgrade preserves a prepared draft"
description: "Inspect a sandbox Android app after an externally performed upgrade to confirm that a preexisting local draft migrates and saves without losing fields."
canonical_url: "https://vostride.com/agent-library/android-flows/upgrade-preserves-local-draft.md"
md_url: "https://vostride.com/agent-library/android-flows/upgrade-preserves-local-draft.md"
content_kind: "recipe"
topic: "android-flows"
---

# Verify Android upgrade preserves a prepared draft

Inspect a sandbox Android app after an externally performed upgrade to confirm that a preexisting local draft migrates and saves without losing fields.

## Risk

A clean install cannot reveal a local-data migration failure. Preserve a versioned pre-upgrade fixture and compare its values with both the upgraded editor and the first committed record after migration.

## Fixtures

- An external installation workflow that creates a draft in the previous supported Android build, upgrades to the candidate build, and records both versions.
- An Android target using use.mobile.appState: preserve; resetting app state would invalidate this migration scenario.
- A draft fixture with title, rich-text approximation, category, and an attachment reference plus a read-only backend oracle showing no committed draft record.

## Steps

1. Verify the installation fixture confirms a successful upgrade and retained application data, then open the candidate app and verify the expected account.
2. Reopen the prepared local draft and verify its title, body paragraphs, category, and attachment label against the pre-upgrade fixture manifest.
3. Edit only the final body line and verify all untouched fields remain present before saving.
4. Save the migrated draft once and verify its reopened detail contains the edited line alongside every preserved field.
5. Inspect the independent record and attachment references and verify a single created record, valid attachment linkage, and no duplicated migration artifacts.

## Expected results

- The candidate editor recovers the complete pre-upgrade draft from preserved local data.
- The committed record contains only the intentional body change from the fixture baseline.
- The attachment reference remains valid and is linked exactly once after the save.

## False-pass traps

- Preparing the draft on the candidate build skips the migration being tested.
- A successful login after upgrade does not prove that local drafts or attachments survived.

## Cleanup

- Delete the committed sandbox record and retire or reimage the versioned upgrade fixture.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa mobile testing](/docs/agent-qa/guides/mobile-testing.md)
- [agent-qa test](/docs/agent-qa/configuration/test.md)
- [agent-qa hooks](/docs/agent-qa/guides/hooks.md)

- [Android application QA recipes](/agent-library/android-flows.md)
- [Software factory QA library](/agent-library.md)
