Ranorex for Andorid Emulator App testing integrate Jenkins.

Mobile Testing, Android App Testing.
ashokvaddevalli
Posts: 18
Joined: Thu Mar 26, 2015 9:58 am

Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by ashokvaddevalli » Thu Mar 26, 2015 10:05 am

I am working in Jenkins.
I am integrating Automation of testing scripts and Tools in Jenkins.

I done web app testing using Ranorex integrate in Jenkins.
I am facing issue with Android app testing using Ranorex in Jenkins.
There is no documentation for how to integrate Ranorex for Mobile App testing in Jenkins.

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by krstcs » Thu Mar 26, 2015 7:10 pm

I not sure I understand your issue. Please describe the issue you are having.

What exactly is the problem you are trying to overcome with Jenkins?

It should work the same for running any test created with Ranorex.
Shortcuts usually aren't...

ashokvaddevalli
Posts: 18
Joined: Thu Mar 26, 2015 9:58 am

Re: Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by ashokvaddevalli » Mon Mar 30, 2015 5:58 am

Hi,

My issue is Android Emulator App testing using Ranorex completed, but integrate Jenkins it is not working. It is showing device not found error. It is same way Web App testing using Ranorex in Jenkins it is working fine. There is no documentation for integrate mobile app testing ranorex in Jenkins.

zivshapirawork
Posts: 65
Joined: Wed Sep 24, 2014 7:47 am
Location: Israel

Re: Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by zivshapirawork » Mon Mar 30, 2015 6:03 am

Probably the issue is missing drivers for the device, on the Jenkins slave. Download and install them.

ashokvaddevalli
Posts: 18
Joined: Thu Mar 26, 2015 9:58 am

Re: Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by ashokvaddevalli » Mon Mar 30, 2015 6:42 am

I got below erro in Jenkins console

Cannot start mobile app 'com.gorillalogic.monkeytalk.demo1' because there is no device with name 'emulator-5554' in the list of configured devices.

Why it is not support existing ranorex Record Testing script in testing for multiple Android Emulator versions.
It is always findout the recoring emulator devices only.

ashokvaddevalli
Posts: 18
Joined: Thu Mar 26, 2015 9:58 am

Re: Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by ashokvaddevalli » Mon Mar 30, 2015 8:00 am

[android] Installing APK file 'Demo1.apk'
[Softwares] $ E:\Softwares\android-sdk\platform-tools\adb.exe -s emulator-5784 install -r Demo1.apk
pkg: /data/local/tmp/Demo1.apk

Success

1073 KB/s (250726 bytes in 0.228s)
[workspace] $ cmd.exe /C '"C:\apache-ant-1.9.4\bin\ant.bat -file build.xml && exit %%ERRORLEVEL%%"'
Buildfile: C:\Users\Ashok\.jenkins\jobs\RanorexforAnroidEmulatorProject\workspace\build.xml

run:
[exec] Starting: Intent { act=android.intent.action.MAIN cmp=com.gorillalogic.monkeytalk.demo1/.RootActivity }

wait:
BUILD SUCCESSFUL
Total time: 12 seconds
Picked up JAVA_TOOL_OPTIONS: -Xmx1024m -XX:MaxPermSize=512m -Xms512m
Path To MSBuild.exe:
Executing the command cmd.exe /C " "" .\emulator.sln " && exit %%ERRORLEVEL%% from C:\Users\16989\.jenkins\jobs\RanorexforAnroidEmulatorProject\workspace
[workspace] $ cmd.exe /C " .\emulator.sln " && exit %%ERRORLEVEL%%
[workspace] $ cmd /c call C:\Users\16989\AppData\Local\Temp\hudson5480442740257307140.bat

C:\Users\Ashok\.jenkins\jobs\RanorexforAnroidEmulatorProject\workspace>.\emulator\bin\Debug\emulator.exe /rf:.\Reports\40\40\Report.html
[2015/03/30 12:27:17.985][Debug ][Logger]: Console logger starting.
[2015/03/30 12:27:18.397][Info ][Test]: Test Suite 'emulator' started.
[2015/03/30 12:27:18.551][Info ][Test]: Test Case 'TestCase' started.
[2015/03/30 12:27:18.595][Info ][Test]: Test Module 'Recording1' started.
[2015/03/30 12:27:18.775][Info ][Application]: Run mobile app 'com.gorillalogic.monkeytalk.demo1' on device 'emulator-5554'.
[2015/03/30 12:27:19.307][Error ][Module]: Cannot start mobile app 'com.gorillalogic.monkeytalk.demo1' because there is no device with name 'emulator-5554' in the list of configured devices.
[2015/03/30 12:27:19.495][Failure][Test]: Test Module 'Recording1' completed with status 'Failed'.
[2015/03/30 12:27:19.496][Failure][Test]: Test Case 'TestCase' completed with status 'Failed'.
[2015/03/30 12:27:19.527][Failure][Test]: Test Suite 'emulator' completed with status 'Failed'.
[2015/03/30 12:27:19.658][Debug ][Logger]: Console logger stopping.

C:\Users\Ashok\.jenkins\jobs\RanorexforAnroidEmulatorProject\workspace>exit -1
Build step 'Execute Windows batch command' marked build as failure
[android] Stopping Android emulator
[android] Archiving emulator log
$ E:\Softwares\android-sdk\platform-tools\adb.exe kill-server
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level C:\Users\16989\.jenkins\jobs\RanorexforAnroidEmulatorProject\workspace\Reports\40\40 to C:\Users\16989\.jenkins\jobs\RanorexforAnroidEmulatorProject\builds\40\htmlreports\Ranorex__Report
Finished: FAILURE

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

Re: Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by odklizec » Mon Mar 30, 2015 8:27 am

Hi,

I guess you run Jenkins on different machine than is you dev. machine (machine where you added android devices and developed your Ranorex scripts)? In this case, you need to copy RanorexConfig5.xml (from C:\Users\username\AppData\Roaming) to the target Jenkins machine. Each added device is stored in RanorexConfig5.xml, which is unique for each machine where you install Ranorex. In other words, you must unify Ranorex configurations both on dev. and test machine. Hope this helps?
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

ashokvaddevalli
Posts: 18
Joined: Thu Mar 26, 2015 9:58 am

Re: Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by ashokvaddevalli » Mon Mar 30, 2015 9:02 am

Hi,
Testing team is record the mobile app testing using Ranorex Studio, and after commit the code in svn repository.
I pull the code from svn and integrate Ranorex.
Jenkins is running in Windows Machine and also Ranorex is installed in same machine.

My Job Config in Jenkins looks like below screens.

My question it is possible running record scripts in multiple Android Emulatdor devices with diff. versions.

Regards,
Ashok
You do not have the required permissions to view the files attached to this post.

ashokvaddevalli
Posts: 18
Joined: Thu Mar 26, 2015 9:58 am

Re: Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by ashokvaddevalli » Mon Mar 30, 2015 9:04 am

Source codre/Recodrs Scripts looks like in SVN Repo
You do not have the required permissions to view the files attached to this post.

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

Re: Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by odklizec » Mon Mar 30, 2015 9:26 am

Yes, it should be possible to run your recorded scripts on multiple devices/emulators. But you need to have them stored in the list of Devices and then you need to use a data driven approach. Check for example this lesson, or this this screencast. These tutorials are not directly "mobile" related, but you can use the same approach for mobiles. Simply, you just have to create a data connector, with the list of devices (their names) and pass the name of device to recorded script via binded variable.

Eventually, you can attend >this webinar<. And if you check youtube, you can find this recorded webinar... https://www.youtube.com/watch?v=jMXw7vSID4U
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

ashokvaddevalli
Posts: 18
Joined: Thu Mar 26, 2015 9:58 am

Re: Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by ashokvaddevalli » Mon Mar 30, 2015 10:35 am

@Odklizec,

I followed your comment, i asked my testing team for providing RanorexConfig5.xml. I replaced file in my system.
Now again run job in jenkins, I got diff. error.


C:\Users\Ashok\.jenkins\jobs\RanorexAnroidEmulator\workspace>.\AndroidEmulator\bin\Debug\AndroidEmulator.exe /tc:TestCase /rf:.\Reports\15\15\Report.html
[2015/03/30 15:01:31.862][Debug ][Logger]: Console logger starting.
[2015/03/30 15:01:32.263][Info ][Test]: Test Suite 'AndroidEmulator' started.
[2015/03/30 15:01:32.489][Info ][Test]: Test Case 'TestCase' started.
[2015/03/30 15:01:32.504][Info ][Test]: Test Module 'Recording1' started.
[2015/03/30 15:01:32.609][Info ][Application]: Run mobile app 'com.gorillalogic.monkeytalk.demo1' on device 'emulator-5554'.
[2015/03/30 15:01:43.090][Error ][Module]: Failed to start app 'com.gorillalogic.monkeytalk.demo1' because the app started event was not received within the specified timeout of '00:00:10'.<br/>The operation has timed out.
[2015/03/30 15:01:43.250][Failure][Test]: Test Module 'Recording1' completed with status 'Failed'.
[2015/03/30 15:01:43.251][Failure][Test]: Test Case 'TestCase' completed with status 'Failed'.
[2015/03/30 15:01:43.269][Failure][Test]: Test Suite 'AndroidEmulator' completed with status 'Failed'.
[2015/03/30 15:01:43.400][Debug ][Logger]: Console logger stopping.

C:\Users\Ashok\.jenkins\jobs\RanorexAnroidEmulator\workspace>exit -1
Build step 'Execute Windows batch command' marked build as failure
[android] Stopping Android emulator
[android] Archiving emulator log
$ E:\Softwares\android-sdk\platform-tools\adb.exe kill-server
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level C:\Users\16989\.jenkins\jobs\RanorexAnroidEmulator\workspace\Reports\15\15 to C:\Users\Ashok\.jenkins\jobs\RanorexAnroidEmulator\builds\15\htmlreports\Ranorex__Report
Finished: FAILURE

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

Re: Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by odklizec » Mon Mar 30, 2015 11:22 am

Try to increase the Connect timeout and Remote call timeout to 30sec or longer, as described here:
http://www.ranorex.com/forum/device-com ... tml#p30427
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

ashokvaddevalli
Posts: 18
Joined: Thu Mar 26, 2015 9:58 am

Re: Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by ashokvaddevalli » Mon Mar 30, 2015 11:52 am

Same issue in after increasing timeout
I tried in 30s, 50s, 80s

[2015/03/30 16:18:41.162][Debug ][Logger]: Console logger starting.
[2015/03/30 16:18:41.239][Info ][Test]: Test Suite 'AndroidEmulator' started.
[2015/03/30 16:18:41.245][Info ][Test]: Test Case 'TestCase' started.
[2015/03/30 16:18:41.259][Info ][Test]: Test Module 'Recording1' started.
[2015/03/30 16:18:41.329][Info ][Application]: Run mobile app 'com.gorillalogic.monkeytalk.demo1' on device 'emulator-5554'.
[2015/03/30 16:20:01.504][Error ][Module]: Failed to start app 'com.gorillalogic.monkeytalk.demo1' because the app started event was not received within the specified timeout of '00:01:20'.<br/>The operation has timed out.
[2015/03/30 16:20:01.606][Failure][Test]: Test Module 'Recording1' completed with status 'Failed'.
[2015/03/30 16:20:01.607][Failure][Test]: Test Case 'TestCase' completed with status 'Failed'.
[2015/03/30 16:20:01.607][Failure][Test]: Test Suite 'AndroidEmulator' completed with status 'Failed'.
[2015/03/30 16:20:01.628][Debug ][Logger]: Console logger stopping.

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

Re: Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by odklizec » Mon Mar 30, 2015 12:26 pm

Have you tried to run that failing emulator manually or from command line? Does it run OK outside Ranorex (on the same machine)?
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

ashokvaddevalli
Posts: 18
Joined: Thu Mar 26, 2015 9:58 am

Re: Ranorex for Andorid Emulator App testing integrate Jenkins.

Post by ashokvaddevalli » Mon Mar 30, 2015 12:59 pm

You mean commandline of running Ranorex testing scripts or running android emulator and install apk file.

Each time running job in Jenkins, it is doing with below activities,
1. Create new Emulator
2. Install APK
Final Running the Ranorex Record scripts.

I did not try commandline, i tried Jenkins only.