Skip to content

chore(e2e): Add E2E test automation and remove legacy tests#112

Merged
floydkim merged 44 commits intomasterfrom
e2e-automation
Feb 17, 2026
Merged

chore(e2e): Add E2E test automation and remove legacy tests#112
floydkim merged 44 commits intomasterfrom
e2e-automation

Conversation

@floydkim
Copy link
Collaborator

@floydkim floydkim commented Feb 17, 2026

Summary

  • Add end-to-end test automation using Maestro for CodePush example apps
  • Remove legacy AppCenter-based test infrastructure (test/, code-push-plugin-testing-framework/, Examples/create-app.js)
  • Clean up unused devDependencies and tslint config

E2E Test System

The new e2e/ directory provides a fully automated E2E testing workflow:

  • Mock server: Local Express server (port 18081) serves bundles and release history, replacing the need for a real CodePush backend
  • Config preparation: Patches App.tsx to point at the mock server with backup/restore
  • Bundle preparation: Uses npx code-push CLI to create release history and bundle updates
  • Build: Builds example apps in Release mode for iOS simulator / Android emulator
  • Maestro flows: Three test phases covering update installation, rollback to binary, and partial rollback (v1.0.2 → v1.0.1)

Test Phases

  1. Basic flows — App launch, restart stability, update installation with metadata verification
  2. Rollback to binary — Disables a release, verifies automatic rollback to binary version
  3. Partial rollback — Deploys v1.0.1 + v1.0.2, disables only v1.0.2, verifies rollback to v1.0.1 (not binary)

Usage

npm run e2e -- --app RN0840 --platform ios
npm run e2e -- --app RN0840 --platform ios --maestro-only  # skip build

Removed

  • test/ — Legacy AppCenter/Mocha test suite and scenario templates
  • code-push-plugin-testing-framework/ — Unused testing framework
  • Examples/create-app.js, Examples/nexpect.js — Legacy app creation script
  • tslint.json — Replaced by eslint
  • 11 unused devDependencies: @types/assert, @types/mkdirp, @types/mocha, @types/q, archiver, body-parser, mkdirp, mocha, q, slash, tslint

Test plan

  • Run npm run setup-example-app -- -v 0.84.0
  • Run npm run e2e -- --app RN0840 --platform ios (+ android)
  • Verify all three Maestro phases pass (basic, rollback, partial rollback)
  • Confirm npm run jest and npm run typecheck pass

Move E2E patches that don't need runtime application into the app
template and setup script: updateDialog removal, Alert→console.log,
METADATA indicator, usesCleartextTraffic, SUPPORTED_PLATFORMS
restriction to iphonesimulator only.
…back flow

- Always pass --simulator to run-ios (auto-detect booted or default
  iPhone 16) to prevent targeting connected physical devices
- Guard JSON.stringify with ?? null for undefined metadata values
- Use code-push CLI (create-history, update-history) instead of direct
  JSON manipulation for release history management
- Remove redundant 02-clear-and-restart rollback flow
…splay

Add E2E test for partial rollback scenario (1.0.2 → 1.0.1) where only
the latest release is disabled, verifying rollback targets the previous
update instead of the binary. Use console.log markers to ensure different
bundle hashes for releases with identical source content.

Change metadata indicator from METADATA_LOADED to METADATA_V{label} to
display the actual running version in the UI.
Remove Examples/create-app.js, Examples/nexpect.js, and test/ directory
which were part of the old AppCenter-based testing setup. Also remove
related test:* and tslint scripts from package.json.
Remove 11 unused devDependencies left over from legacy test
infrastructure: @types/assert, @types/mkdirp, @types/mocha, @types/q,
archiver, body-parser, mkdirp, mocha, q, slash, tslint.
@floydkim floydkim changed the title chore(e2e): add E2E test automation and remove legacy tests chore(e2e): Add E2E test automation and remove legacy tests Feb 17, 2026
@floydkim floydkim merged commit ddb61b0 into master Feb 17, 2026
2 checks passed
@floydkim floydkim deleted the e2e-automation branch February 17, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments