Test execution on Mobile so slow

Hi Katalon team,

I’m trying to run automation test cases on device Oppo fs1 and it’s so slow. Is there any way to speed it up? I knew we have delay between actions for Web Ui but I can not find the same for Mobile. Please advise!

Thanks.

Hi loc,

It’s expected because Mobile execution is not the same with Web execution. There is no ‘delay between actions’ settings for Mobile execution, so that’s why you can’t find it. Mobile execution has more delay time than Web execution because it takes more time to find an object, but it should not be so low.

Can you tell me what average time to do it from your current execution?

Regards

Hi Vinh,

Thank you for your reply. It took me more than 2 mins to execute login test case having only 8 steps.

01-24-2018 05:11:04 PM - [START] - Start Test Case : Test Cases/Oppo_fs1/Login_Individual

01-24-2018 05:13:22 PM - [END] - End Test Case : Test Cases/Oppo_fs1/Login_Individual

Is there any way to improve it?

Thanks.

Is this expected execution speed or it can be better for iOS Simulator: :slight_smile:

Test case steps:

Mobile.startApplication(’/Users/zlatan/Desktop/todo.app’, false)

Mobile.tap(findTestObject(‘ToDo iPad App/XCUIElementTypeTextField’), 2)

Mobile.sendKeys(findTestObject(‘ToDo iPad App/XCUIElementTypeTextField’), ‘Orange’, FailureHandling.STOP_ON_FAILURE)

Mobile.tap(findTestObject(‘ToDo iPad App/XCUIElementTypeButton - Add’), 2)

Mobile.tap(findTestObject(‘ToDo iPad App/XCUIElementTypeTextField’), 2)

Mobile.sendKeys(findTestObject(‘ToDo iPad App/XCUIElementTypeTextField’), ‘Lemon’, FailureHandling.STOP_ON_FAILURE)

Mobile.tap(findTestObject(‘ToDo iPad App/XCUIElementTypeButton - Add’), 2)

Mobile.tap(findTestObject(‘ToDo iPad App/XCUIElementTypeTextField’), 2)

Mobile.sendKeys(findTestObject(‘ToDo iPad App/XCUIElementTypeTextField’), ‘Apple’, FailureHandling.STOP_ON_FAILURE)

Mobile.tap(findTestObject(‘ToDo iPad App/XCUIElementTypeButton - Add’), 2)

Mobile.closeApplication()

Default timeout is set to 10 instead of 30, but there is no difference in Test Case total time execution. If this timeout is e.g. 5, Test case will fail.

Test_Speed.png

timer.png

Zlatan Midzic said:

Is this expected execution speed or it can be better for iOS Simulator: :slight_smile:

Versions:

brew -v

Homebrew 1.5.2

node -v

v9.4.0

npm -v

5.6.0

carthage version

0.27.0

appium -v

1.7.2

iOS version = 11.2.1

macOS version = 10.13.2
**mac **= MacBook 12" Early 2015 | 8GB RAM

Xcode version = Version 9.2 (9C40b)

ios-deploy --version

1.9.2

Katalon Studio version = 5.3 Build 1

Any answers so far?

1 Like

Hi team,
I’m executing 8 lines of code in Katalon, and it took nearly 4 minutes for execution. My code only consists of “Tap” operation, whereas it took 18 seconds for Appium Studio to perform the same execution. Is there any way to improve the execution speed?
Thanks.

kona mohan said:

Hi team,
I’m executing 8 lines of code in Katalon, and it took nearly 4 minutes for execution. My code only consists of “Tap” operation, whereas it took 18 seconds for Appium Studio to perform the same execution. Is there any way to improve the execution speed?
Thanks.

Any updates here. I am also facing the same issue, it took more time to execute one test case

Hi guys! Tell me, please, what do you use for tests? Emuliator or real device?
I had the same problem. Before i used Android emuliator from Android studio and one test executed about 2 minutes. But now i am using Genymotion emuliator and my test executing about 45 sec.

Hi There,
I am using iOS simulator to execute my test suite and it’s taking too much time in execution from 2nd test case on-wards
My 1st test case is login into application and after it 2nd test case is to perform some action on the landing screen and after completion of 1st test case it takes too much time to execute steps of 2nd and other consecutive test cases.(Sometimes it’s taking even approx 400-450 seconds to execute single step)

Apart from it there is one more issue that some times steps of test cases are shown as executed in ‘log viewer’ but these are not reflecting in the emulator during execution.

Hi guys, any resolution of slow execution even on real devices in Katalon?

Please try the below:

  1. In desired capabilities add [ automationName = UiAutomator1 ] if using a lesser version of Android and appium. For Higher version you can add UiAutomator2 you can find the same in Project>Settings>Desired Capabilities>Android

  2. Update Node js and Install the compatible version of Appium to the OS.

Let me know if it helps. Solved my Issue.

Hi @tanmaykumarnanda, is there an equivalent of this for iOS? Thank you.

Hello, has anyone resolved this? I am running iOS automation on real device and it takes 10 seconds for each step to be executed. :frowning: On Android, there’s no problem, the execution time is just like on Web.

Same problem here, I am using Katalon Studio 7.0.4 with Appium 1.15.1 and x code 11.1, Get attribute keywords taking 9 seconds to execute.

How do improve this ?

@Chris_Trevarthen @duyluong

Hi @satish1607,

How are you defining the Test Objects? Is it by xpath, type, name, etc.? Having a unique name (which comes from the accessibility id in the Xcode project) should provide the fastest way to get the element.

It is likely that iOS tests are going to be slower than Android tests for a couple of reasons:

  • iOS interactions need to go through the WebDriverAgent to access the device or simulator, which is another app that gets installed on the device. This may not be as efficient as Android.
  • To determine what’s on the screen, Appium gets an XML representation of all of the elements. For Android, only the visible or loaded elements on the screen come back, so the XML can be much smaller than iOS, which returns everything. This makes parsing XML in iOS take longer, hence the need for more targeted xpaths.

– Chris

Thanks Chris I understood this, is there any way to get the accessibility id from Katalon?

Hi @satish1607,

You can use Katalon’s Spy Mobile tool to inspect an element. The property that shows as “name” is the same as the accessibility id that’s set in the Xcode project.

—Chris

Thanks Chris for you explanation, still I feel execution is taking more time even though I am using by name.
Highlighted one taken 6 + seconds to tap.

Please help me to improve my execution :

Is there any other way to reduce the execution time? Please help.

@Chris_Trevarthen