test: strengthen SDK assertions and run all test suites - #816
marandaneto wants to merge 2 commits into
Conversation
Test coverage before and afterCompared baseline
Across the reported modules, covered lines increased from 11,837/14,632 (80.90%) to 11,890/14,632 (81.26%). Covered branches increased from 6,495/9,579 (67.80%) to 6,554/9,579 (68.42%). These totals sum module-local counters, not a combined measurement of every process and dependency. Measurement details
Test results
Debug and release variants count separately. The six skips are three existing manual benchmarks in each Android variant. There were no failures or errors. Raw XML, HTML where generated, logs and the counter-comparison script are retained locally outside the commit. Stronger failure detection is the main outcome of this audit; these coverage percentages alone do not prove test quality. |
|
|
[Low risk] Test suite improvements and assertion strengthening. The PR appears safe to merge, with non-blocking test-configuration and cleanup issues to address. Reviews (1) · Last reviewed commit: "test: strengthen SDK assertions and run ..." |
posthog-android Compliance ReportDate: 2026-09-27 14:41:43 UTC ✅ All Tests Passed!46/46 tests passed Capture Tests✅ 29/29 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
|
Removed the empty changeset in 1923463. This PR only changes tests and test configuration, so it should not bump or release any SDK package. The changeset-hygiene warning does not require adding package releases. The PR description now reflects this and the CI-preserving test commands. Autoreview of 1923463 against origin/main reported no findings. |
💡 Motivation and Context
Several tests could pass without exercising the behavior named in the test. Some checked an unattached queue, stopped before the last batch was sent, used fixtures that skipped the intended request, or tested a private copy of a survey algorithm.
make testalso omitted core, server and plugin suites.This PR strengthens those tests without changing production SDK code:
checkandmake test.make test, including the plugin's two-AGP functional matrix. Enable library debug tests with-PenableDebugTests=trueinstead of overridingCI, so signing and sample-plugin settings keep their CI behavior.No changeset or package release is needed because this changes tests and test configuration only. Local audit logs and coverage reports are not part of the commit. The coverage comparison is posted as a separate PR comment.
💚 How did you test it?
Validated locally with Java 17.0.18-amzn:
CI=true make test,CI=true make testSurveyUIandmake checkFormat: passed. Module XML reports contain 3,154 passing invocations and six existing benchmark skips, counting debug and release separately.CI=true: passed.CI=trueis preserved, signing stays required, the sample upload plugin stays disabled, and debug tests are included.make compile,make testReport,koverXmlReportand supplemental Compose/plugin coverage reports. Coverage in the separate comment is measured at that original commit.1923463f21629a52d826771e2f6a60f4f90ed958againstorigin/main: no findings.No device/emulator tests, live-service acceptance tests or manual benchmarks were run. Plugin coverage does not measure execution inside nested TestKit Gradle processes.
📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file (not applicable to this test-only PR)🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Prepared with Pi, delegated module audits, shell/Gradle tools and isolated autoreview. The audit prioritized tests that observe actual SDK behavior over test counts. Survey algorithm checks were moved to the Android implementation rather than preserving private simulations in core tests. No production behavior or public API was changed. Human review is required.