ppkarwasz commented on PR #90:
URL: 
https://github.com/apache/commons-secure-xml/pull/90#issuecomment-5653985649

   Rebased on `main` (which already carries the JUnit 5 plugin bumps from 
#92/#93) and pushed the AGP 9 DSL migration: 
`testOptions.managedDevices.devices` is gone in AGP 9, so the managed device is 
declared through the typed `localDevices` container.
   
   What is still missing is on the AGP side. Same tests, same JUnit 5 plugin 
(2.0.1), same emulator:
   
   | | tests | failures | skipped |
   |---|---|---|---|
   | AGP 8.6.1 (`main`) | 259 | 0 | 87 |
   | AGP 9.4.0 (this PR) | 259 | 87 | 0 |
   
   The 87 are JUnit 5 assumption aborts (`TestAbortedException`) — 
platform-dependent skips such as *"platform DOM does not resolve user-defined 
entities"*. The device-side invocation is identical in both runs; only the 
host-side result handling differs. AGP 8 wrote a per-suite 
`TEST-<device>-_-.xml` with `skipped="87"`, AGP 9 aggregates through its 
`com.android.junit.engine.*` plumbing into a single `<testsuites>` file with 
`failures="87"`.
   
   **1. Keeping `de.mannodermaus.android-junit5`**, we need AGP 9 to:
   
   - record an aborted JUnit 5 test as skipped rather than failed;
   - tolerate (or drop) an instrumentation argument with an empty value. The 
plugin passes `-e configurationParameters ` with nothing after it, `am 
instrument` then reads the following key as the component name and fails with 
`No instrumentation found for: de.mannodermaus.junit.unsupported.behavior`, so 
zero tests run and the JaCoCo task dies on the empty execution data with 
`Invalid execution data file`. Worked around in this PR by giving that argument 
a value; it could equally be fixed on the plugin side.
   
   **2. Migrating to AGP's own JUnit 5 support**, we would need:
   
   - a device-side Jupiter engine. Dropping the plugin today yields 
`tests="0"`: the `com.android.junit.engine.*` properties AGP 9 passes are 
host-side result plumbing, not an on-device engine;
   - tag filtering equivalent to `junitPlatform { filters { includeTags("dom | 
sax | schema | trax") } }`, which this module uses to skip the JAXP groups 
Android does not ship;
   - the Jupiter artifacts to package without a hand-written 
`packaging.resources.excludes`, since `mergeDebugAndroidTestJavaResource` 
otherwise fails on `META-INF/LICENSE.md` duplicated across 
`junit-platform-engine`, `junit-platform-commons` and `junit-jupiter-engine`;
   - the same skipped-not-failed reporting as in 1.
   
   Until the first point of 1 is fixed upstream, CI on this branch stays red on 
those 87 phantom failures.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to