 All right, so welcome everyone to the session, Synchronizing Parallel iOS Tests by Merit. We are glad that Merit could join us today. Without further delay, we hand it over to you, Merit. Thank you, thank you for joining and thank you for having me here. I'm glad to be actually the last one to present the session here at that conference. And yes, my name is Merit. I'm from TestProject. For those who are not familiar, TestProject is a platform that is built on top of Appium. If there will be no Appium, then there will probably be no mobile automation and TestProject. And just a few words about TestProject before we begin. TestProject is a platform that allows automating web and mobile Android and iOS tests. It has two ways of doing this. One is the recorder that I'm going to demonstrate in a second. And another one is the SDK that is built on top of the Selenium and Appium SDK. So those who are not interested in creating recorded scenarios, they can use the SDK as well. Now, what I'm going to show you today is basically a scenario in which we will have two iOS tests running on physical iOS devices. And let me just show my other camera here. Okay, these are the two devices that I'm going to use. Okay, this is the iPhone XR app that this is the iPad app that. And let me switch back the camera here to myself so you can see me. And now I'm going to demonstrate what is the scenario that I'm trying to automate here and the problem that I would like to resolve. So as I mentioned before, just to get started, before we dive into the source code and the IDE world, I would like to demonstrate how it looks like in the Corvette scenario. So as you can see, this is the TestProject website and this is my Windows computer, okay? And even though it's a Windows machine, I can still see my iOS devices connected here. And as I mentioned before, I will be using the iPhone XR to demonstrate the recorded flow. So let's see how it looks like when I project the device screen into my browser. I take some moment until, as you probably all know, the iOS driver of getting provision. And then this is, as I mentioned before, my physical iPhone XR device with iOS 15 installed, okay? As I said before, this is a device lined right here next to me, okay? And what I'm going to do now, I'm going to open this recorded test here that has prepared ahead of time, okay? And demonstrate the scenario that I would like to automate and resolve eventually, okay? So this recorder will present you the telegram application, which is an instant messenger. Hope Mr. Durov has nothing against us automating his application. And this particular scenario is going to send the message and then wait for reply. Specifically, it's gonna click on this entry-free man contact here. And then it's gonna type, welcome to Appium Conference 2020 white one text. And then it's gonna click on the send button and wait for things reply to arrive. Again, unfortunately, this is not going to work because everything will happen except the six step because there will be no other participant in this test to send the reply. And if we would like to test this functionality of waiting for another test to fulfill its duties, we will have to do it in a different form. So let me do something here. Let me run this test really quickly, okay? And then I'm going to switch to my other camera here while sharing the screen as well. We can see that the message is being typed, okay? And while it's typed, once done, it is sent. You can actually see it's happening live on the device. And now it's waiting for the things reply to arrive, but unfortunately it's not going to happen, as I said before. So we're going to stop the reported flow here and let me just delete this message really quickly so that we can have a pre-steem state later on for the next demonstration. And what I'm going to do now, I'm going to close the recorder and use the convenient feature that we provide here a test project to generate code, okay? So we'll have this recorded flow generated into a Java code. And this will become a code project here. So I'm going to extract it because this is basically a package with a greater project. And I'm going to open it in my IDE, just open it in here. And what we will find here is basically the very same scenario that I've shown you before, but this time it's going to be a Java code that is based on the Selenium and Appium Client tool. So it should be familiar to all of who are creating automated tests using Appium. And this will include the very same steps that I've shown you before. So in this particular case, it resets the application and then it uses the iOS predicate to find an entry freeman contact then it clicks this contact and then it searches for the message field and sends their welcome message to Andrew Freeman. And eventually it clicks on the send button to send the message. The only thing that happens next and is not working is that it waits for a thanks reply. But since the reply never arrives, then the test never succeeds and always fails. Now, based on this test that I have generated now into code, and again, it's the same syntax that you're familiar with from Appium. There is nothing new here except the fact that we're using the test project Open SDK, which is open source and allows you to run this test not directly on an Appium server, but via the test project agent on the test project platform locally or from the cloud. So I'm going to close this test here because I've prepared something else that is based on the very same test, but it's a little bit enhanced and I'll show you what it is. So what we have here is basically the same test, just a bit simplified for the reading business. Again, it searches for Andrew Freeman and then it sends the welcome message and then it waits for thanks. But this is just the first test called the sent message. There's a second test called the reply to message and instead of searching for the Andrew Freeman contact, it searches for Jacob Greenwich. This is the second person in the telegram contacts that is basically the one who is going to reply to this first message. So the second person is waiting for the welcome to Appium conference message to arrive and once it arrives within the grace period of 60 seconds, if everything goes well, as you can see, I'm checking here for an expected condition, then it sends the thanks reply, okay? Types in the thanks and clicks on send. If everything goes well, then the first test receives the thanks, okay? And then in first that everything went well and the test has been successful. Now, in order to make it all work, what I have to do next is I have to package this test into jar file, okay? Package all these tests into jar file and use the test project platform to execute them in parallel on my two iOS devices, on my Windows operating system. So what I've done before is that I've only uploaded this jar file, okay, the telegram jar file and now I have these two tests inside. I have the send message and I have the reply through message, okay? And then I also have created two jobs here. One is the telegram sender and this job is going to be executed on my first device, the one that I've used for recording the iPhone XR, okay? And then I have the second job called the telegram receiver, which is right here, okay? And it's going to be executed on my iPad. So let me answer my screen here for a moment. Let me switch to the devices camera, okay? And what I'm going to do now is that I'm going to execute these jobs that I've just shown you. One right after another and you will actually see how they are being executed in parallel and working together in a synchronized mode, okay? So I'm clicking here on play next to each of these jobs, okay? Let me share really quickly my screen for just one second here. You can see the monitor that these tests are being now executed together, okay? And now you can see the camera with the devices hopefully, okay? And in a moment, you will see how the execution is getting started. The one is the iPhone XR. You can basically see that it types in the welcome message. And the other one is the iPad that is waiting for the message to arrive, okay? And once it arrives, then the second test takes its turn and replies with the things replied. And once it's all done, then the first test assumes that everything went well and it's knowing that basically it can finish the execution. So now let me switch back to my main camera here and share my screen and let's have a quick look at what happened here. So even though these tests I've shown you before does not have any special instructions or commands for reporting anything besides these failure points here, I can still see a report available on the test project platform. And if I open the sender test, what I can see here basically, and this is my local time. This is 8.06 because I'm right now in Canada. So it's my local time. This is the current execution that just happened for that in conference 2021 on my iOS device. And we can see a report that has been generated out of the IP command. So it was searching for Andrew Freeman and then it was typing the welcome to IP conference text. And of course, all of these can be parameterized and data driven, but we're not going to see how it can be done on this project. It's all available in the documentation on GitHub. But the most important part here is basically this step here, the custom step report is currently part of the code. And it says reply arrived on time. And the proof for the fact that indeed it happened is right here. So we can see that on September 17th, we have a welcome to Akron conference 2021 and a tense reply. Okay, so this is basically what we have just seen. And again, this demonstrates how these two tests, the one in the sender and the one in the receiver. Okay, this is the receiver because it also replied with thanks. Okay, let me find it. This is the Jacob Greenwich. Okay, and it typed thanks and reply. Okay. And since these two tests were executed in parallel at the same time on the test project platform, these two iOS devices, this become possible. And of course it can be done with pure IPM and IPM grid and perhaps some other solutions of synchronizing things such as queues or real-time databases and so on, et cetera. This would be a bit more easier way to get started and synchronize tests one with another for running in parallel. I think I forgot only five minutes left now. Yeah, yeah, and I'm actually done here. So thank you very much for listening. And now I'm open for any questions you might have to answer these. So go ahead, please. And let me know what interests you. Thank you for being part of this demonstration. So I will request audience to post their questions in Q&A. There's one comment, a great session. Thank you, Shubham. Okay, there's one question. Manu, do you want to start? Yeah, I will. Thank you. So thanks, Rao, for asking if this project supports running a Maven AutoTest project. Yes, since it's based on Java, you can use any model or dependency management tool. You can use Gradle, you can use Maven, it's all up to you. So there's no reason why now. Shubham Tandav is asking how many parallel devices iOS tests we can run? Is there a limitation? So in general, it depends on the resources of your machine. Since the platform and the agent in particular needs some resources to run things. But it should be fine with a reasonable amount of devices. I think I tried like seven or eight. You can see some behind me and it works fine. So it's more of a question of a budget. How many devices you'll get? Samit Barat is asking, does this project reporting support QCAMBER structure? Let's see what's the questions about this project here. I'm not about that. Yes, this project open SDK for Java supports QCAMBER structure as well with feature files. It's a plugin that you can incorporate into your code as a separate dependency. And yes, it will allow you to see QCAMBER reports in the dashboard as well. All right, great. Thank you so much everyone for... Thank you, Marit. Thanks for the lovely talk. I really liked this project. Bye everyone.