Skip to content

test(oss-licenses): introduce unified 'testapp' verification suite#380

Open
timothyfroehlich wants to merge 1 commit intomainfrom
froeht/integration-tests
Open

test(oss-licenses): introduce unified 'testapp' verification suite#380
timothyfroehlich wants to merge 1 commit intomainfrom
froeht/integration-tests

Conversation

@timothyfroehlich
Copy link
Member

@timothyfroehlich timothyfroehlich commented Mar 10, 2026

Overview

This PR introduces a robust, standalone 'testapp' verification suite for the oss-licenses-plugin. It significantly expands the testing capabilities of the repository by providing both an interactive app for manual verification and full end to end robolectric tests of the plugin and library together.

Key Changes vs Main

1. New 'testapp' Project

  • Interactive UI: A Compose-based MainActivity with buttons to explicitly launch the V1 (Legacy View) and V2 (Modern Compose) license activities provided by the library.
  • Authentic Testing: Unit tests are configured with full R8 minification and obfuscation for the release variant to verify the plugin's behavior in production-like scenarios.

2. Robolectric Test Suite

  • Variant-Aware Testing:
    • src/testRelease: Verifies comprehensive license metadata (Gson/Guava) and detail navigation against the minified release build.
    • src/testDebug: Validates the 'Debug License Info' placeholder injected by the plugin in development builds.
  • Configured to run across a wide range of SDKs (24, 33, 34, 35) with support for parallel execution.

3. Dynamic E2E Matrix Runner

  • TestAppEndToEndTest.kt: A new E2E test in the main plugin suite that uses the testapp as a template. It dynamically injects AGP and Kotlin overrides to test the plugin against its full compatibility matrix (currently AGP 8.10 through 9.1).

4. Infrastructure & Hygiene

  • GitHub Actions: Integrated the new testapp verification into the main.yml workflow to run on every pull request.
  • Dependabot: Configured automatic weekly updates for the new testapp dependencies.
  • Documentation: Added a dedicated GEMINI.md guide for maintaining the test harness.

Verification

  • ✅ Local verification via ./gradlew :app:test (all 15 tests pass).
  • ✅ E2E matrix verification across all defined AGP/Gradle versions.
  • ✅ Manual UI verification on emulator.

Rename 'integration-app' to 'testapp' and align project structure with
modern development standards.

- Refactor 'integration-app' to 'testapp' with package
  'com.google.android.gms.oss.licenses.testapp'.
- Implement a Compose-based MainActivity with interactive buttons for
  manual V1/V2 license activity testing.
- Divide Robolectric suite into variant-aware source sets:
    - 'testDebug': Sanity checks for 'Debug License Info' placeholder.
    - 'testRelease': High-signal verification of minified and obfuscated
      license metadata.
- Refactor 'TestAppEndToEndTest.kt' to dynamically inject AGP/Kotlin
  overrides, enabling the matrix to test older compatible versions.
- Enable parallel test execution and harmonize SDK coverage (24-36).
- Standardize all files with Apache 2.0 license headers.
- Update GitHub Actions workflow and Dependabot to target 'testapp'.
@timothyfroehlich timothyfroehlich force-pushed the froeht/integration-tests branch from 472d6fc to 661c53b Compare March 12, 2026 22:24
@timothyfroehlich timothyfroehlich changed the title test(oss-licenses): introduce unified integration-app test suite test(oss-licenses): introduce unified 'testapp' verification suite Mar 12, 2026
@timothyfroehlich timothyfroehlich changed the base branch from gradle-upgrade to main March 13, 2026 15:58
@timothyfroehlich timothyfroehlich marked this pull request as ready for review March 13, 2026 17:10
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