Tester Asset Delivery
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Suivez les étapes de ce guide pour tester la manière dont votre application intègre Play Asset Delivery pour récupérer des packs d'éléments.
Tester en local
Play Asset Delivery permet d'effectuer des tests en local en installant une nouvelle version du jeu à l'aide de bundletool
. Utilisez des tests en local pour des cycles rapides et itératifs, car vous n'avez pas besoin d'importer le jeu sur les serveurs Google Play. La procédure à suivre varie selon que vous développez avec Java, en natif ou avec Unity.
Java ou natif
Pour tester votre application en local, procédez comme suit :
Créez votre app bundle.
Générez des APK avec l'indicateur --local-testing
:
java -jar bundletool-all.jar build-apks --bundle=path/to/your/bundle.aab \
--output=output.apks --local-testing
Connectez un appareil et exécutez bundletool
pour télécharger les APK indépendamment :
java -jar bundletool.jar install-apks --apks=output.apks
Unity
Dans l'éditeur Unity, sélectionnez Google > Build and Run (Compiler et exécuter).
Comportement
Les packs install-time
seront installés pendant le processus d'installation de l'application.
Les packs fast-follow
se comportent comme des packs on-demand
. Ils ne seront donc pas automatiquement récupérés lorsque le jeu sera téléchargé indépendamment. Les développeurs doivent en faire la demande manuellement au début du jeu. L'opération ne nécessite aucune modification du code dans votre application.
Restrictions
Les restrictions des tests en local sont les suivantes :
- Les packs récupèrent des données sur un espace de stockage externe plutôt que sur Play. Vous ne pouvez donc pas tester le comportement de votre code en cas d'erreurs réseau.
- Les tests en local ne couvrent pas les situations d'attente de Wi-Fi.
- Les mises à jour ne sont pas compatibles. Avant d'installer une nouvelle version de votre build, désinstallez manuellement la version précédente.
Tester avec le partage interne d'application
À mesure que vous approchez de la version finale, testez votre jeu en utilisant une configuration aussi réaliste que possible pour vous assurer qu'il fonctionnera correctement pour vos utilisateurs en production. Pour vous en assurer, vous pouvez utiliser le partage interne d'application afin d'obtenir un lien pouvant être partagé et permettant de télécharger le jeu sur Play, tout en obtenant exactement le même comportement que vos utilisateurs une fois le jeu publié sur le Play Store.
Pour tester Asset Delivery à l'aide du partage interne d'application, procédez comme suit :
- Créez votre app bundle.
- Suivez les instructions de la Play Console pour savoir comment partager votre application en interne.
- Sur l'appareil de test, cliquez sur le lien de partage interne d'application correspondant à la version de votre application que vous venez d'importer.
- Installez l'application depuis la page Google Play Store qui s'affiche lorsque vous cliquez sur le lien.
Le contenu et les exemples de code de cette page sont soumis aux licences décrites dans la Licence de contenu. Java et OpenJDK sont des marques ou des marques déposées d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/27 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/27 (UTC)."],[],[],null,["# Test asset delivery\n\nUse the steps in this guide to test how your app integrates Play Asset Delivery\nto retrieve asset packs.\n\nLocal testing\n-------------\n\nPlay Asset Delivery supports local testing by installing a new version of the\ngame using [`bundletool`](/studio/command-line/bundletool). Use local testing\nfor quick, iterative cycles as it avoids the need to upload the game to Google\nPlay servers. The steps you need to take depend on whether you're\ndeveloping in Java, native, or Unity.\n\n- [Java](#steps-native-java)\n- [Native](#steps-native-java)\n- [Unity](#steps-unity)\n\n### Java or native\n\nFollow these steps to test your app locally:\n\n1. [Build your app bundle](/guide/playcore/asset-delivery#next-step-instructions).\n\n2. Generate APKs with the `--local-testing` flag:\n\n ```\n java -jar bundletool-all.jar build-apks --bundle=path/to/your/bundle.aab \\\n --output=output.apks --local-testing\n ```\n3. Connect a device and run `bundletool` to sideload the APKs:\n\n ```\n java -jar bundletool.jar install-apks --apks=output.apks\n ```\n\n### Unity\n\nIn the Unity Editor, select **Google \\\u003e Build and Run**.\n\n### Behavior\n\n`install-time` packs will be installed during the app installation process.\n\n`fast-follow` packs behave as `on-demand` packs. That is, they won't be\nautomatically fetched when the game is sideloaded. Developers need to request\nthem manually when the game starts; this does not require any code changes in\nyour app.\n\n### Limitations\n\nThe following are limitations of local testing:\n\n- Packs fetch from external storage instead of Play, so you cannot test how your code behaves in the case of network errors.\n- Local testing does not cover the wait-for-Wi-Fi scenario.\n- Updates are not supported. Before installing a new version of your build, manually uninstall the previous version.\n\nTesting with internal app sharing\n---------------------------------\n\nAs you get closer to having a release candidate, test\nyour game using as realistic a configuration as possible to make sure that your game will perform\nwell for your users in production. To validate this, you can use\n[internal app sharing](https://support.google.com/googleplay/android-developer/answer/9303479)\nto get a sharable link that you can use to download the game from Play while\ngetting the exact same behaviour as your users will once the game is\npublished to the Play Store.\n\nTo test Asset Delivery using internal app sharing, do the following:\n\n1. Build your app bundle.\n2. Follow the Play Console instructions on how to [share your app internally](https://support.google.com/googleplay/android-developer/answer/9303479).\n3. On the test device, click the internal app-sharing link for the version of your app you just uploaded.\n4. Install the app from the Google Play Store page you see after clicking the link."]]