You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.`yarn tests:android:post-e2e-coverage` — poll/pull `coverage.ec`, Jacoco report (best-effort, never fails the job)
7
+
3. Codecov upload — `continue-on-error: true`
8
+
9
+
Native Android coverage is **not** pulled inside `tests/e2e/firebase.test.js`. Pulling mid-Detox ran before `DetoxTest.dumpCoverageData()` and routinely missed the file.
10
+
11
+
## CI failure: Jet 1006 → adb `reverse --remove` mid-run
12
+
13
+
Observed on [run 27803881448](https://github.com/invertase/react-native-firebase/actions/runs/27803881448):
When the Jet/app WebSocket drops (1006), Detox can treat the session as dead and tear down instrumentation **while Jet is still in its 15s reconnect grace**. That triggers `reverseRemove` before the orchestration retry's `terminateApp()`. If the listener was never established or was already removed, adb exits non-zero.
34
+
35
+
**Mitigation (patched):**`.yarn/patches/detox-npm-20.51.0-*.patch` makes `ADB.reverseRemove` ignore `listener 'tcp:…' not found` during teardown.
36
+
37
+
**Orchestration retry:**`firebase.test.js` still retries on `RETRYABLE_DISCONNECT`; attempt 2 can pass all tests even when attempt 1's teardown logged adb noise.
38
+
39
+
## Troubleshooting
40
+
41
+
| Symptom | Likely cause |
42
+
|---------|----------------|
43
+
|`[native-coverage] Android native coverage pull failed`| Detox exited before instrumentation wrote `coverage.ec`; post-e2e poll may still recover it |
44
+
| Empty Jacoco XML (~235 bytes) | No `.ec` pulled — check post-e2e logs |
45
+
|`adb reverse --remove` in Detox logs | Expected on 1006; should be warn-only after Detox patch |
46
+
| Detox red, tests green in log | Pre-patch: teardown adb error; re-run or check patch applied |
Copy file name to clipboardExpand all lines: okf-bundle/testing/coverage-design.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,13 +108,13 @@ After a Detox/macOS e2e run, expect log lines like `[jet-coverage] WS received N
108
108
## Pipeline
109
109
110
110
1. Gradle enables `testCoverageEnabled` on RNFB Android library modules (`tests/android/build.gradle`).
111
-
2. Detox e2e runs; the instrumented app writes `coverage.ec`.
112
-
3.When the Jet process exits successfully, `tests/scripts/pull-native-coverage.js` copies the `.ec` file to `tests/android/app/build/output/coverage/emulator_coverage.ec`. **A failed pull logs a warning and does not fail the Detox test** (intermittent on CI when `coverage.ec` is not flushed in time). Jacoco report may be empty for that run.
113
-
4.`yarn tests:android:test:jacoco-report` runs `jacocoAndroidTestReport`, producing XML at:
111
+
2. Detox e2e runs; the instrumented app writes `coverage.ec` when instrumentation finishes (`DetoxTest.dumpCoverageData()` after `Detox.runTests()` returns).
112
+
3.**After Detox exits**, `yarn tests:android:post-e2e-coverage` (CI) or `yarn tests:android:pull-native-coverage` polls for `coverage.ec`, pulls it to `tests/android/app/build/output/coverage/emulator_coverage.ec`, then runs `jacocoAndroidTestReport`. A missing file logs a warning and does **not** fail the Detox test or the CI job (`continue-on-error` on Codecov upload).
0 commit comments