Slow interaction with Android apps - possible solution

Mobile Testing, Android App Testing.
User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5353
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Slow interaction with Android apps - possible solution

Post by odklizec » Thu Mar 07, 2019 3:28 pm

Hi guys,

I've recently started automating Android apps and I was shocked about the speed (slowness) of interaction with instrumented apps via spy and overall speed of playback. A simple test consisting of login, few touches and validations here or there and logout took about 18-20m! Plus it was incredibly slow to interact with the app UI, via Spy. Just today, I found an old post discussing similar issue. And sure enough, disabling "Full image comparison" in instrumentation settings helped also in my case! The same test now finished in 1.8-1.9m and interaction with UI via Spy is smooth, like working with desktop/web apps. I can finally track elements, without 30s or longer delays, between clicks in mobile app UI tree :D
FullImageComparison.png
FullImageComparison.png (33.03 KiB) Viewed 312 times
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

dugovic.milan
Posts: 66
Joined: Wed Jun 29, 2016 1:19 pm
Location: Frankfurt, Germany
Contact:

Re: Slow interaction with Android apps - possible solution

Post by dugovic.milan » Mon Mar 11, 2019 9:01 am

You are most likely aware of this, but when you run your tests over WiFi, not via USB it also speeds up you test execution. But anyhow, thanks for the hint. Much appreciated!
Ranorex Explorer @DVAG
Support my Ranorex Ideas & Improvements
My current approach: Ranorex 8.3.0

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5353
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Slow interaction with Android apps - possible solution

Post by odklizec » Mon Mar 11, 2019 9:49 am

Hi Milan,

Yes, I'm aware that wifi is supposed to be faster. However, it was not helpful in this particular case. It appears that if the instrumented app features camera functionality, this instrumentation flag dramatically slows the Ranorex/AUT interaction performance.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

mafi
Posts: 17
Joined: Thu Mar 21, 2019 2:43 pm

Re: Slow interaction with Android apps - possible solution

Post by mafi » Thu Aug 01, 2019 4:02 pm

Hi,
I faced the same problem at my side as well, but that setting didn't help me so much.
It is true the Spy performances improved, but test running is still slow finding elements.
Perhaps it is just my feeling, but I think the speed gets worst elapsing time. I mean, the same object that searched at the beginning of the test can be found in some seconds, at the end of the test cannot be found at all. It seems that some kind of buffer overflows...
Anyone has the same problem?
Any suggestions?

mafi
Posts: 17
Joined: Thu Mar 21, 2019 2:43 pm

Re: Slow interaction with Android apps - possible solution

Post by mafi » Fri Aug 02, 2019 1:13 pm

I tried also to disable screenshots and Android OS automation options from plugin settings of solution, but nothing: speed slightly improves, but TS cannot finish, because latest test cases fail finding elements that at the beginning of the TS can be successfully found.
I also noticed that, trying to spy the device once failed TS, I can see the device, but no children in it.
I tried to refresh the connection during the test (Ranorex.Core.Remoting.RemoteServiceLocator.Service.GetByDisplayName(DeviceName).Reconnect(); and Ranorex.Core.Remoting.RemoteServiceLocator.Service.Refresh();) but it didn't help.
I do not know what's the problem; the main goal would be end the whole test suite and then increase performance if possible.
Is there anyone who can help with some suggestions?
Thanks.