kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Run the Android platform tests in CI

Open rtibbles opened this issue 4 months ago • 2 comments

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

The android member ships Python and JVM unit tests that no CI job runs, and the JVM tests are accidentally coupled to a built Kolibri dist. Run both in CI, and make the JVM tests run standalone.

Complexity: Medium Target branch: develop

Context

  • The platform_tests matrix (tox.yml:348-387) covers only kolibri-server and kolibri-app; android is absent.
  • platforms/android/scripts/tests/test_cdp_helper.py (pytest) never runs.
  • It needs no Kolibri build.
  • Five Robolectric JVM unit tests under app/src/test/java/org/learningequality/Kolibri/ (KolibriEnvironmentManagerTest, AuthUtilsTest, ContextUtilTest, ShareUtilsTest, BaseTaskWorkerTest) never run.
  • No gradle test task exists in any workflow.
  • The JVM tests need no emulator (testOptions.unitTests.returnDefaultValues = true, build.gradle:284).
  • gradle test compiles against R.java, which triggers resource processing.
  • build.gradle:192-203 wires generateKolibriStrings → streamlineKolibriTar into that resource path.
  • With no tar in platforms/android/tar/, streamlineKolibriTar resolves a null tar (build.gradle:76) and fails.
  • #15074 retires create_strings.py (strings move to Crowdin), removing the reason resource processing needs the tar — the natural point to decouple the tests.

Acceptance Criteria

  • [ ] The android Python tests (scripts/tests/) run in tox.yml.
  • [ ] The android JVM unit tests (app/src/test/) run in tox.yml via gradle test.
  • [ ] gradle test runs without a built Kolibri dist tar, no longer pulling in streamlineKolibriTar or string generation.
  • [ ] A failing android test fails its CI job and blocks merge (part of the required checks).

AI usage

Claude Code found the android test files and traced the tar-coupling of gradle test through build.gradle. I verified the task wiring and edited the issue.

rtibbles avatar Jul 23 '26 21:07 rtibbles

Plan: Run the android member's Python and JVM unit tests in tox.yml, and make gradle test run standalone without a built Kolibri dist tar.

  • [ ] Android Python tests in the platform_tests matrix
  • [ ] Decouple gradle test from the dist tar
  • [ ] Android JVM unit-test CI job + required-check wiring

@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?
  • Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
  • Ran the project's full test suite and linter before committing
  • For UI changes: captured live screenshots to verify rendering
  • For backend changes: verified with example API/CLI output

rtibblesbot avatar Jul 24 '26 06:07 rtibblesbot

The bot has been waiting for a response for 2 hour(s). It will resume automatically when someone replies.

rtibblesbot avatar Jul 24 '26 09:07 rtibblesbot