RobotFramework/Appium Input Text taking too long

737 views
Skip to first unread message

Noah Reson-Brown

unread,
Aug 2, 2018, 3:50:19 PM8/2/18
to robotframework-users
I have a basic test that uses an emulator to simulate our product on a virtual android device.  But the tests run painfully slow, taking multiple seconds of just waiting before entering text into a field.  Debug from Robot shows the following:

AppiumLibrary . Input Text ${Last Name Field}, ${Last Name}
Documentation:

Types the given `text` into text field identified by `locator`.

Start / End / Elapsed:20180802 11:47:20.471 / 20180802 11:47:25.718 / 00:00:05.247
11:47:20.472INFOTyping text 'McGridtest' into text field 'id=com.appname.android:id/signup_activity_last_name_text'
11:47:20.472DEBUGPOST http://127.0.0.1:4723/wd/hub/session/07b3cb85-a57a-4a93-9260-1dd91b0bfbb5/elements {"using": "id", "sessionId": "07b3cb85-a57a-4a93-9260-1dd91b0bfbb5", "value": "com.appname.android:id/signup_activity_last_name_text"}
11:47:21.020DEBUG{"value":[{"element-6066-11e4-a52e-4f735466cecf":"5"}]}
11:47:21.020DEBUGFinished Request
11:47:21.021DEBUGPOST http://127.0.0.1:4723/wd/hub/session/07b3cb85-a57a-4a93-9260-1dd91b0bfbb5/element/5/value {"text": "McGridtest", "sessionId": "07b3cb85-a57a-4a93-9260-1dd91b0bfbb5", "id": "5", "value": ["M", "c", "G", "r", "i", "d", "t", "e", "s", "t"]}
11:47:25.718DEBUG{"value":true}
11:47:25.718DEBUGFinished Request


Note the 4 seconds delay on the second post.  This is a simple InputText command, and is thus way too slow to use normally.  So what's the deal here?  Is this normal with Appium?

This is using Appium v 1.6.2, with the most recent version of Robot Framework and the Robot Framework Appium Library (downloaded 1 week ago).

Tatu Aalto

unread,
Aug 2, 2018, 4:09:46 PM8/2/18
to nreso...@gmail.com, robotframework-users
Ugh

Last time I tried simulators, they where painfully slow too. Simulators are actually virtual machines that emulate totally different hardware architecture and that just makes them slow. If you want faster simulators, please consult Google or Apple. 

There is a performance again, if you use real devices. Instead of 5 seconds, it could last 2-3 seconds. But even 2-3 seconds is slow compared to Selenium which can perform multiple actions in fraction of a second. Many things makes the mobile testing slow, one is that the it runs on mobile (which has less CPU and memory than desktop computers). Other is the Appium architecture, which has at least three different client/server connections before the single interaction reaches the android os. Also there are many other factors, like what other stuff the device is doing.

As a bottom line, testing in mobile devices is slow, a great deal of slower than in browsers (which is also darn slow). The speed up your testing with mobile:
1) Use real devices and not the cheapest ones. Although using the flagship model is not worth of the money either.
2) Run test suites in parallel.
3) Write small tests, so that the total exception time is small.

-Tatu
Send from my mobile


--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

Noah Reson-Brown

unread,
Aug 2, 2018, 5:18:22 PM8/2/18
to Tatu Aalto, robotframework-users
Thank you for the response, disappointing as it is.  When we worked with Espresso/Spoon, the speed was dramatically faster, faster even than real devices with Appium (which sadly weren't notably faster).  It looks like we'll have to go back to that, which is a shame, because I really liked RobotFramework with Selenium and hoped to find something similar for mobile.

To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.

Tatu Aalto

unread,
Aug 2, 2018, 6:49:08 PM8/2/18
to Noah Reson-Brown, robotframework-users
Ugh

Well, by doing small reading, I don't see why you could not use Espresso with Robot Framework. You would need to build a library, that hooks Espresso methods to keywords. And you would need to use Robot Framework remote library interface[1]. It's some work, but it can be done, if you want it.


-Tatu
Send from my mobile
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.

Noah Reson-Brown

unread,
Aug 2, 2018, 7:35:03 PM8/2/18
to Tatu Aalto, robotframework-users
I think Spoon already does much of what Robot does, so there's not too much advantage there I'm afraid.

To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages