Skip to content

test(e2e): port the native e2e suites, add impact analysis - #3925

Draft
testableapple wants to merge 10 commits into
V10from
ci/v10-e2e-tests
Draft

testableapple wants to merge 10 commits into
V10from
ci/v10-e2e-tests

Conversation

@testableapple

Copy link
Copy Markdown
Member

Ticket: https://linear.app/stream/issue/RN-449

🎯 Goal

Port the native iOS and Android e2e suites to the V10 Detox suite in examples/E2ETestApp, and bring its CI up to the native SDKs: per-test impact analysis on pull requests, a nightly run that builds the coverage map, and Allure TestOps reporting.

πŸ›  Implementation details

Tests

  • 19 suites, 255 tests, ported from the Android compose and iOS UIKit suites (the union of both, with the native names and expectations). Every test links an Allure case in project 3.
  • When the SDK disagrees with the native expectation, the test keeps the native expectation and is skipped with it.skip and a comment that links a ticket. That covers 70 tests, tracked in RN-489 to RN-506. With those skipped, 185 tests run.
  • Robots, pages and support code grew to cover the suites: offline toggling (Android), the media library, JWT asserts, and Android system dialogs.

E2E app

  • Offline support is on (@op-engineering/op-sqlite, <Chat enableOfflineSupport>). The database is wiped at login, so every test starts clean.
  • Added a JWT test screen, plus the channel details and thread screens the suites need.

SDK

  • Additive testIDs only (channel preview, reactions, link previews, unread indicators, swipe actions, and a few others). There is no behaviour change. One snapshot changed because ScrollToBottomButton got a new testID.

Impact analysis (e2e/README.md, "Impact analysis")

  • E2E_COVERAGE=1 builds add a small Babel plugin (e2e/coverage/babelPlugin.js) that records which files run code. It isn't istanbul, because worklets capture istanbul's counters and then throw on the UI runtime.
  • After each test, the app reports its coverage to a collector in the test process, which writes one lcov file per test.
  • build_e2e_coverage_map and select_e2e_tests use fastlane-plugin-stream_actions (bumped from 0.4.14 to 0.4.19).
  • A PR runs only the tests its diff can reach. Changes to the harness, native code, dependencies or lanes still run everything.
  • The Check E2E Required job now also selects the tests, and skips e2e when none are selected.
  • A new nightly workflow, e2e-test-cron.yml, runs everything on Android with the coverage build and uploads the e2e-coverage-map artifact. Until its first run on the default branch, every PR runs all tests.

Allure

  • The Allure lanes moved into examples/SampleApp/fastlane/Allurefile, the same layout as stream-chat-swift. A new allure_testcase lane creates test cases.
  • Allure uses the ALLURE_TOKEN repository secret.

Mock server

🎨 UI Changes

None. The SDK changes are testIDs only.

πŸ§ͺ Testing

  • Full Android run (debug build, emulator): 255 tests, 182 passed, 70 skipped and 3 failed. All 3 passed when rerun:
    • A mock server start timeout, which is a harness issue.
    • RN-489 (the channel actions sheet sometimes opens empty).
    • RN-506 (after jumping to a quoted message, the list stays on the jumped page when the user sends).
  • Impact analysis:
    • Coverage collection checked on debug and release builds (17 of 17 tests collected).
    • A map built from those tests gave sensible selections from changed files.
    • A selection file ran exactly the selected tests.
  • yarn lint, E2ETestApp typecheck and the SDK unit tests pass.
  • iOS isn't tuned yet. Its e2e job still runs on dispatch only.

β˜‘οΈ Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch (targets V10: the suite needs the v10 SDK)
  • Documentation is updated (examples/E2ETestApp/e2e/README.md)
  • New code is tested in main example apps, including all possible scenarios (e2e app only, no SampleApp/Expo changes)

@testableapple
testableapple marked this pull request as draft November 3, 2026 23:07
@Stream-SDK-Bot

Copy link
Copy Markdown
Contributor

SDK Size

title develop branch diff status
js_bundle_size 2037 KB 2021 KB -16317 B πŸš€
ai_components_size 163 KB 163 KB -16 B πŸš€

This branch has not been deployed

No deployments
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.

2 participants