 So welcome everyone to this session Testing Android App Bundle with APM by Masayuki. We are glad that Masayuki could join us today. Thanks Chairman and hello everyone. Thank you for coming to my session. Tonight I'm talking about testing under the bundle with APM. Let me first talk about myself. My name is Masayuki Wakizuka from Japan. I live in Siga Prefecture which is next to Kyoto Prefecture. I work as a software engineer who develops magic part and I do sometimes contribute to open source projects such as APM or counterfeits which is part of Chrome project. And when I have spare time I like to play tennis. So before talking about main topics today, let me introduce our product a little bit, magic part. This is a test autonomy service which supports both web applications and mobile applications and in our sort of core libraries we use Xenium and APM inside our magic part. And we are pretty fortunate given the test automation technology stock involved in recent years we produce our product. And also we might be too small company to be a sponsor of Xenium or APM project. We sometimes contribute to test automation community in a way like submitting their projects or having a community event. And tonight topics I have three topics why it's under the banner and how we test under the banner with APM and also testing with different languages. So firstly why it's under the banner. This is a file format. Previously some of you have already tried Android application testing with APM. In that case you have used to use .apk file extension and when it comes to Android app bundle file, this file has .apk file extension. And this is a file format that includes all of your applications compiled code and resources. And given the under the bundle which uploaded to Google Play, Google Play will generate optimized APK based on the device spec of user diverse. And also signs the generated APK and distributes it to under the users. And then the new applications have been required to publish with this under the bundle format on Google Play since last month. So also the file format has been introduced since 2018. File format under the bundle attracts more attention these days. So why under the bundle is introduced? It's because size matters. The slide here indicates, you know, if the size of your Android application increases, it takes a long time to download from Google Play and also you'll be hesitated to update your Android application. The size of your Android application is too large. And this sounds something like downside, but it's actually turned off. It's because as a number of features, your Android application has increases. It also increases the size of your Android application. So how under the bundle works? Here, let me compare it with Universal APK. Supports a developer uploads a Universal APK to Google Play. User simply downloads the Universal APK from Google Play. Therefore the size of the Android application doesn't change. But when it comes to under the bundle, in this case, Google Play will generate optimized size of APK in terms of size. And it will be based on the device spec of the user device. And also Google Play signs the generated APK file instead of developers. So in this way, Google under the bundle can save the disk usage of Android device. And according to Google, it can save average of 35% of disk usage compared to Universal APK. So next topic is that how we test under the bundle with APK. I will, you know, it consists of four steps. And after explaining the four steps, I will bring to my demonstration. So first of all, you prepare a bundle tool. This is a tool to manipulate things related to under the bundle. And by with this tool, you can also, for example, generate an APK set archive file, which I will explain later. And also you can install an APK set archive. And you can also extract the device spec of your Android real device or Android emulator. By, you know, by using this device spec extracted by bundle tool, you can optimize your, you know, under the resources of your Android application. And you can download it from the GitHub page of Google organization. But the second step, you generate an APK set archive from under the bundle file. And the APK set archive is, you know, file format guitars dot APK is a file extension. And this contains a set of APK files that is split based on device specification like architecture, device architecture or device language or screen resolution or other device specific features. You also generate APK set archive file to issue Java of the command and use special build APK is and use a specify the path to your Android up bundle file. And also you need to specify the output to pass to your pass to the APK set archive file, which should be the output of this command. And then you test, you know, under the bundle in the form of APK set archive file. You need to sign the output of this command. I mean the APK set archive file so you need to specify the past to your key store file. And you need to specify the key areas. And also you need to specify the password of the key store file. And as a third step, you start your app in server. And but before starting your app in server, you need to set up your path environment variable. And in this, in this case, you need to add the past to your bundle tool to the path to the first environment variable. And then the other four step you set up your capability. And the one important capability here is up capability, which should be the pass to your APK set archive file. And by specifying this capability, up in will installs up in installs your APK set archive. Based on your device specification. In other words, you know, up in will optimize the, how to say, the resource of the of your Android application. As Google play does. So, let's move on my demonstration. How to test on the up on the visa PM. And in this demonstration, I will simply launch my Android demo application. And here I have launched emulator, my emulator here. And I have, I hope you can see this. I have my under the bundle file here. And this is my bundle tool. And I have key store file here. And this is my test script. In this demonstration, I will use the basket to longest, but also you can use other, you know, longest binding such as Java, Python, no Ruby or whatever you like. So, first of all, we, you know, generate on APK set archive file. And I'll just check on the step by, you know, set up my path environment variable. I have added the past to the past environment variable. And then I start my appeal server. Before starting my desk script, I will check my desk script. So one, if as I explained, one important capability is up capability here. And this should be the past to the APK set archive file. So let's begin. No appeal server is, you know, establishing up in session, and I have successfully launched. You know, my demo application here. And you can issue any quick or swipe or whatever you want. So that's all by demonstration. By the way, I am using M1 mark. And this moving to the final topic testing with different languages. Some of you have already tried testing with different languages, but unlike testing with APK file, you need to have a trick to test with different languages because, you know, appeal only installs the minimum set of resources based on your device spec. In other words, appeal respect the behavior of under the bundle or I mean, so that's a good pay. And I explain here into this year, three approaches to achieve each of them have pros and cons. And you can choose any of them based on your demand. Or you can make a new one. If you need. The first approach is to use who says to capability. This is pretty simple. You just specify who said to capability here in addition to language and capabilities. And that relationship, that's all. But some of you have already noticed that this approach stopped us application, could use application data and installs application before and after test. Some of you, you know, this might sound like downside for some of you, but this is our main data project suggestions. Our second approach is to install under the under the bundle by yourself. This approach consists of two steps. And the first one is to use bundle to to install your APK set archive file. And so this should be after generating APK set archive from your under the bundle file. And you have to install APK set archive, and you issue Java command. And if you, you know, install APK s, and you should specify the past to your APK set archive file. And also, don't forget to specify the, you know, device ID of your Android device, where you install your Android application. And now that this is by issuing this command, you, you will install all resources of your Android application so it can consume more disk space of your Android device. And the second step you specify you use up package and up activity instead of up capability. And by specifying these capabilities, APM assumes that you have already installed your Android application into your Android device. So APM tries to simply launch your Android application in your device. So the third one is to change device language before APM test. This approach consists of three steps, and this can be complicated to automate and I say this can be for experienced APM users. And I will explain in a way I delivered of how to achieve this approach for voice of keeping voice of explanation. In the first step, you prepare APM setting APK file. You can obtain it from the GitHub page of APM projects, with this Android app, with this APM setting APK file you can. You can change system setting of your Android device. You can change device setting or Wi-Fi setting or whatever. And this is the first step and the second step. You change device language by issuing three ADP commands. The first ADP commands, you install this APK setting APK file, but this is Android application. And the second step you, second ADP commands, you start the setting application. And the third ADP command, you change your device language to Japanese. And then at the third step, you start your APM testing without full reset to capability. So this is a comparison page of three approaches to change device languages. I'm running out of time, so I will probably share this slide later. So please check out the same later. And in conclusion, I explained how to automate under the bundle with APM. And you need to keep in mind that you need to integrate bundle tool in your tool chain to test your Android bundle file. And also you need to consider how to change your device language. That's all for my talk. Thank you for listening. Thank you, Mr. Yuki. It was very enlightening and very nice. So there are a few questions from audience. If you want to see them, you can minimize Zoom and go to question and answer Q&A. Or if you want, I can read that for you. I will read the Q&A. Compress and IPK. There won't be any impact on the code. How about assets? Compressed assets lower the quality. I don't, I'm not sure about, you know, I don't know much about compressing, compressing assets. But I can say that in this, in this, in my presentation, I think I don't compress any anything APK, you know. We just, and I explained how to, you know, generate an APK set archive file from under the bundle. And this is a, this consists of, you know, set of APK file generated from under the bundle. So I'm, I don't think it, you know, any impact, any impact on this approach. Can I, did I answer the question? I think so. The question was, will it affect the quality of the assets? The answer is no, because it's an official tool by Google. And marking it as done. There is possibly no other question. And, yeah, we have one more question from Saravanan. He says, does all the versions of APM support APKs? Sorry, I'm not much, I don't know much about the, which, from which version of APM support APKs. But I can say that it, it is introduced, the format you under the bundle file format is introduced two years, about three years ago. And one of the APM Committer has worked on the, you know, how to, you know, support under the bundle around two years ago. So I think, you know, let's say, you know, a pretty old version of APM version can probably can support under the bundle probably two or three years ago. I think that answers the question. The answer is the very old versions older than two years ago will not support it. But some, if the version is before two years old, I mean, after within less last two years, it will support it. And if you are interested, you can go to GitHub. There's a commit which, which, which is about support version. And I, I personally use this and at least from version 18 when I was last using it it was supported 18 or 19. Currently we are on 21, 121.21. It definitely supports that. So that's answered. Yes. If it doesn't answer that your question, you're free to ask a follow up question. We'll wait for one more minute for, for people to think more about it. And if there's no questions we'll move to hangouts table where in people can more fully speak to our speaker. Without, without waiting for typing their questions and answering it. So there is a comment nice speaker and nice host. Thanks. Thank you, Rahul, and thanks for the comment about the host, which doesn't need me. Thank you for accepting my proposal. Thanks everyone for joining in. And thanks Masayuki for being with us today.