With this tutorial, you will learn how to use TestMu AI's cloud-based testing platform to automate mobile app testing across real Android and iOS devices.
Introduction
App Automation on Real Devices
Conclusion
This video was recorded before LambdaTest became TestMu AI, so the speaker uses the LambdaTest name.
Hello everyone, today let's talk about App Automation on LambdaTest. LambdaTest supports running your native app test cases on both iOS and Android devices. This that you see on the screen is the LambdaTest App Automation dashboard, where you get the details of each and every test case that you run. Before we discuss about the dashboard, let's get on to how we reach here.
Opening my codebase, I have a very basic script where I am opening up an application, and I'm performing a few clicks before entering few data, and that's it. In the same manner, you might also have a script for your iOS or Android-based application, but you might be currently testing on your local device, or you might be testing on a cloud grid, which you can easily transition to LambdaTest. Any test script you currently have can be transitioned to LambdaTest, which is two steps.
First step is, you need LambdaTest's username and access key. Basically, to authenticate yourself as a user on the LambdaTest platform, you need the credentials, and how you can get these credentials is from the automation dashboard. Just click on the key icon, under which you will get both the username, access key, as well as the hub URL.
Once you have the credentials, then you need the set of capabilities. Capabilities are basically nothing but the instructions that you provide the LambdaTest grid as to what particular device platform you want to run your test on. From where you can generate these capabilities is from an intuitive page we like to call as Capability Generator.
From the Capability Generator, you can choose the capabilities based on a language under which you already have your code setup running. So in my case, since I have Java, I'll select Java. I'll click on Appium, and it will automatically give me the different device choices. Since LambdaTest only supports app automation on real devices, you'll have to make sure that whenever you are running your app automation test cases, you have the Real Device toggle on, which will in turn return your capability, which is called isRealMobile true.
Once you have that, then based on your application, if it's Android or iOS, pick the selection and choose a device that you want to run the test on, along with its version. Once you have selected the device, then you need an app URL, which tells the LambdaTest grid as to you want to run all of the test script that's written below on this particular app.
But how do you get this app URL? To get this app URL, you can simply go onto the LambdaTest automation dashboard, click on App Upload, click on Browse File, which will automatically open a native window on a desktop, and select the APK or IPA you want to run the test on. And as soon as you select this, the app gets uploaded on one of the secure locations behind your username and access key, and it will return you an app URL, which you can use in the capability section. As you can see, the app is now uploaded, and now you can copy this particular app URL, which you can use in the capability section.
Right, that is it. You have all the capabilities you need to run. Since in my code I've already set the capabilities, I've already configured them, I'll not be changing those. And also, if, let's say, you want logs, that is network logs, then device logs, the screenshots for each and every step that are running, all the console logs, you can control those by the capabilities as well.
Once you have the username, access key and the capabilities, you simply need to create a remote WebDriver connection, which includes your username, your access key, hub URL (in case of LambdaTest real devices, the address of the hub URL would be mobile-hub.lambdatest.com), along with the capabilities. Once you have all this and the script is down there, the only thing you need to do is just right-click and run the test.
Now, as soon as I go to the App Automation dashboard, here on the App Automation dashboard, as you can see, new builds have landed, which means the test that I've run has now landed here. I'll quickly refresh the page, and you can see Demo Android that I just ran has now landed. This particular screen shows all of the builds that you ran while executing a test case on LambdaTest. I'll click on it, and this will give you the detail of the test that is currently getting executed.
Here on the left-hand side, it gives you the details of the test device that it got executed on, along with its version. On the right-hand side, it gives you the execution video. I'll quickly refresh it once. Yeah, on the right-hand side, it gives you the complete execution video of the test case that it just executed, and below it, it gives you the details of the app info, the capabilities that you selected, along with the screenshots that were captured.
And here in the middle, it gives you each and every command that got executed, and if you select this Visual checkbox, it will also show you the screenshots that got captured, which are saved here as well. Then it will also give you the network logs that you captured, the device logs, as well as the Appium logs. As mentioned, the Appium logs, device logs, network logs, as well as the visual logs, such as the screenshots, all of these can be controlled using capabilities.
Also, this particular test, if you want to share it directly with someone in your team or outside, you also have an option where you can directly share this by simply entering in their email address, and they can directly view the complete execution of a particular test.
In a very similar way, since we executed the test for Android, in a very similar way, you can also execute the test case for iOS as well. In my case, since I executed it with Java, here if I go (no, I went on a wrong screen), yeah, here if I go, you'll get a complete sample of the test that I just executed, and along with that, you'll also get the APKs and IPAs. So since the test that I executed was Android, you can also execute iOS tests as well.
I hope the session for App Automation on LambdaTest was helpful. If in case you have any questions related to any of the topics on LambdaTest, feel free to reach out to LambdaTest chat support, or reach out to support@lambdatest.com.