Appium Tests are slower than Selenium Tests

Dear everyone,

Appium Tests seem to be quite slow compared to the Appium Tests that execute in seconds.

Initially I had thought this could be due to implementing wait mechanisms like that of Implicit wait, Explicit wait and Fluent wait.

Later found that there was no need for any wait between the commands in my Appium Test. Only place where there was need for Fluent Wait was during Synchronization. A selenium Test which use to take less than a minute takes 2.4 minutes to complete in Appium on the Android Device.

I would be very grateful to know if this is expected of Appium and Appium Studio? My concern is about running a number of tests in a continuous integration environment like Teamcity and looks like these Appium Tests could take more than a few hours to complete while the Selenium Web Tests take very less time to run successfully.

In other words, I would be very happy to know if this is a technology limitation and we are still to innovate robust and quicker mobile testing strategies or if I have got something basically wrong in the way I have setup my Appium tests please?

Thanks,
K.Raghavan

Hi Raghavan,
The difference in execution times between Mobile and Desktop platforms is expected. It can depend on various factors. For example, mobile devices generally have less processing power than desktop computers. Therefore, mobile browsers take longer to render pages, and JavaScript-intensive pages can run very slowly. When I ran a simple test for google search, selenium test took 8.1 seconds while the appium test took 12.6 seconds. There’s no co-relation in general between both the execution times but it almost always takes more time in mobile devices than in desktop to run the same commands.

Regards,
Chinni Sai Harshith

Hi Chinni,

Many thanks for the reply. It is great to understand that the difference in run times is expected although can not be correlated due to various factors such as Hybrid App with javascript.

Our mobile app is built using Cardova and is a Hybrid App and is not a mobile browser based application.

One of the tweaks suggested by our team which has helped is by not relaunching the mobile app everytime and instead for an end to end test, launching the mobile app only once to complete the end to end test before closing the mobile app. There has been a great difference in the total execution time. To be specific, our end to end test has a combination of Appium and Selenium tests. When the mobile app is launched every time, the total execution of end to end tests took 33.5 minutes and it now takes only 17.3 minutes.

I shall keep this thread posted with any other performance tweaks we identify.

I had one another question. Do you by any chance know the default polling interval between commands when no wait mechanism is implemented? In other words, between 2 findByElement commands, if there are no wait mechanism implemented, there is a red rectangle that keeps hitting the page until it finds the element when a red circular dot clicks the element when found. This to my understanding is that the command is trying to find the element every so number of seconds and eventually finds and clicks the element. Do you know how often this happens (default polling interval)?

Thanks & Regards,
Raghavan