Question

How to speed up calabash-android query

query always take 2-3 seconds. For each query it takes around 2-3 seconds how to minimize it. I am using 0.4.6 version of calabash

for ex.

date       time        query
10/22/2013 2:32:15 PM: query("*").
10/22/2013 2:32:18 PM: [0]....

10/22/2013 2:32:36 PM: query("*").
10/22/2013 2:32:39 PM: [0]....

10/22/2013 2:33:17 PM: query("webview css:'input'").
10/22/2013 2:33:19 PM: [0]....

10/22/2013 2:34:35 PM: x=query("button id:'dashboard_button_01'").
10/22/2013 2:34:37 PM: [0]....

10/22/2013 2:35:21 PM: touch x.
10/22/2013 2:35:22 PM: {..}
Was it helpful?

Solution

As your tests seem to be running slow, I am guessing it could be because you are testing in simulator. Which can be really slow.

Assuming that the emulator is making this slow for you, you can follow the guidelines here on how to speed up the emulator on intelhardware http://software.intel.com/en-us/articles/speeding-up-the-android-emulator-on-intel-architecture

It gives a huge boost in performance of the emulator.

I hope it helps you.

OTHER TIPS

1) I have notice queries are quiker than perform action so avoid performAction if you can

2) if you have to mutiple queries to make on a view, make one query and then capture results into array and then analyse results using ruby code. use this function **wait_for_elements_exist(elements_arr, options={})** if you want to wait for more than one element

Try GenyMotion emulator instead of default SDK one. It runs extremely faster, and query performs really fast as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top