Turn your manual testers into automation experts! Request a DemoStart testRigor Free

Cross-platform Testing: Web and Mobile in One Test

If you’ve been following us for some time, you might already know that testRigor is a champion in end-to-end testing. During this session, we will talk about how you can combine various platforms in a single test and discuss some of the applicable scenarios.

Here’s the transcript of the video for your convenience:

Speaker: Hello, everyone. Very excited to show you a demo of our end-to-end testing, which involves both mobile applications and web applications. I will show you how to easily do that at testRigor, and will walk you through the process from beginning to an end. First of all, let’s create an application (in testRigor test suite settings), cross-web and mobile. So, the trick here is that it should be native mobile application because you can always specify a new URL. However, you can currently only upload one application, such as an Android APK or an iOS application. You can specify username and password for the login function. Let’s select Android, let’s choose Samsung Galaxy, and we can generate one test. I’ll pick a sample application. While the automatic test is being built for us, we will look into resources and check the documentation.

You can always go to Resources > Documentation. Here, we have a section where it says Table of Basic Commands. Closer to the end of this section, where is the part after geolocation where it says: Start browser, Start device. You can start multiple browsers and multiple devices at the same time. Why would you do that? For example, you might want to check different roles, how they see information propagated instantaneously. Or you might want to test a chat, especially with multiple involved parties, web and mobile. There’s a command including “and switch”, which you can use after starting a new browser or a device, and then immediately switching to it.

Also, almost all of our documentation now has examples where you can open up an example test. It’s an actual test, which is running on testRigor, illustrating the command. Okay, let’s get back. This is an automatically generated test. For a simplistic application, this is what it does: are you ready, are you steady, and that’s it. So testRigor has generated this test for us, and let’s do the following. Let us create a new test called “Cross web and mobile”. So first of all, what the system will do is load the mobile application, and then we want to start the browser. We’ll paste the command open URL “https://amazon.com” for example.

Then we can input click “cart”. Then we need to figure out how to switch back (for demo purposes). It is not going to do anything wrong. Let’s switch back. Let’s switch back to default, which is an original device. And then in the device, you can input tap About. Let’s Add and Run. It will take a little bit of time, because as I mentioned, this is the mobile first test suite, and therefore it will first reload the mobile application. And then it will start with the browser, switching to it, etc. And then it will just quickly switch back.

So, the way our system works with mobile applications is, it starts the server and starts the emulator, which you specify when you create a test suite, and it downloads your mobile application locally, uploads them into emulator/simulator, and it starts the mobile application. Then it waits until the mobile application starts. And when it’s all done, then it starts with the test so you can see it and then it starts to execute the commands which you have specified when you have created this test case. So, it started. As you can see, this is a screenshot, the original one. Here, we started a new browser and switched there. And then we started Amazon, click cart, the cart is clearly empty. Then it switched back to default, and then it clicked About. And well, we are in the About section. So, as you can see here, this test spans both web and mobile. And of course, you can do API calls, you can interact with email or text messages in the same test. And, of course, anything else that testRigor is capable of, we can just do in a sentence, as soon as it is in our language – basically, almost anything you can think of, you can just do it in testRigor as soon as you create the command.

Okay, so that’s it. It’s pretty easy, as I mentioned. Usually, if you want web and mobile, the trick is you start from mobile and then you can start the browser, and switch between the browser and devices. Pretty straightforward. If you are a customer, you have a channel to talk to us, please don’t hesitate to ask additional questions if you have any. Also please ask any questions right now if you’d like and we’ll be happy to answer them.

Narrator: Yes, you can either use the chat or the Q&A. So, the first question is: Is multiple device usage possible?

Speaker: So, is multiple device usage possible? Not yet. It will be sticking to the device type you have specified when you created the test suite. So, if you check the documentation, there is no currently supported syntax to specify what device you want to use. However, if there is something important in your particular case, we’re happy to do that. Second, in the majority of test cases you actually don’t need that because I think what you’re looking for is running the same test on multiple devices. In this particular example, we selected Samsung Galaxy. But let’s, for example add Pixel XL, save. So we specified two devices now and then we now re-run the tests – they will run on two devices. So, literally there will be two tests, two copies of it. One will run on Android Ultra (which is Samsung S20), and another one will run on Android Pixel XL.

This is usually what our customers want when we’re talking about multiple devices. But there is currently no support of starting multiple different devices from one test. We can kick off additional devices – but those will all be the same type during the test. However, for example, you can add additional devices while testing on Samsung S20. And they say, Hey, start me a new device, it will start yet another S20. So, you can test chat with them through such instances. However, if you’re running, as I showed you here, for example, a Pixel XL, it will start a second Pixel XL. You can test the chat between two Pixel XL instances, and you can use multiple devices this way. If you need something additional, something extra, please do let us know. We will consider your use case, and we’ll be happy to add support for it. And this is how you switch, right. So, this is a default, you click on this one. This is different. This is XL and you can probably notice the resolution changes a little bit here.

Narrator: Okay. And one of our customers says: Nice feature. She uses it a lot. So, the next question is, can we switch between portrait mode and landscape mode in mobile testing?

Speaker: Portrait mode and landscape mode? Great question (added: We currently don’t have this feature, however it is in our backlog to be added in one of the future releases)

Narrator: Okay. So, are there any other questions? We have a few minutes here where you can ask them. We are running this session every other week now. And so you’re welcome to register. I’m sending out an email. So, if you’re not getting that email, you should let us know. I’ll put in my email address here for you to let me know. Any other questions for this session? And like I said, we have our next one coming in two weeks. We are recording all these. And so, we have a library that is on the testRigor.com/events. All of these recordings are there. All right. Do you have anything to add, Artem, to wrap this up?

Speaker: Not really. We will be always happy to answer any of your questions. If you need any help on setting up your cross-web mobile testing, would be happy to help.

Related Articles

Cross-browser Testing: Test Against Every Browser

Cross-browser Testing: Test Against Every Browser with testRigor About 94% of first impressions on web applications are ...