[Question] Proper way to test minified release build from test only module
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- android, kotlin
- Ambito
- build-system, mobile, testing
Direzione di ricerca
Inizia con la configurazione buildTypes del modulo e2e e la gestione delle varianti del plugin com.android.test descritta nell’issue. Riproduci l’esecuzione dei test sull’output release minificato dell’app, quindi determina se la configurazione supportata può mantenere il codice di test non minificato accettando al contempo il mapping release. Il lavoro è completato quando i test UI vengono eseguiti correttamente sull’app minificata senza ridurre il codice di test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I have a multi-module Android project with a dedicated e2e module for UI tests that applies the com.android.test plugin.
The test sources live under the main source set (not androidTest).
The goal is to run UI tests against the minified release build to verify ProGuard/R8 shrinking/obfuscation doesn’t break anything and the app doesn't crash.
However, I don’t want to minify the test code itself.
Current Build Setup
In the e2e module I configured build variants like this:
buildTypes {
debug {
matchingFallbacks += listOf("release")
}
create("appTest") {
isMinifyEnabled = false
initWith(getByName("debug"))
}
}
Problem
When running tests, I get this error:
Mapping file found in tested application: .../app/build/outputs/mapping/release/mapping.txt
This means that the tested application has shrinking enabled.
For the test to work correctly, please enable shrinking in this test project as well
If I change the test build type to:
isMinifyEnabled = true
Then the test module fails because ProGuard/R8 shrinks the test code — and I don’t want the test code obfuscated or optimized.
- Lingua principale
- Java
- Stelle
- 1.2k
- Fork
- 342
- Merge medio
- 1g 14h
- PR unite (30g)
- 5
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di android/android-test
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
android/android-test#681 · 2 commenti · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
android/android-test#2507 · 1 commento ·
-
ξεκσνδξδ Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
android/android-test#2499 ·
-
ησξξσ Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
android/android-test#2498 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
android/android-test#2473 ·
Tutte le issue di android/android-test
Issue simili
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Apertaarea/plugin
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
kestra-io/plugin-kestra#190 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/rocketmq-dashboard#5064 ·