How to execute android testsuite .exe file using command line

Ask general questions here.
priyank1989
Posts: 20
Joined: Wed Aug 14, 2019 8:59 pm

How to execute android testsuite .exe file using command line

Post by priyank1989 » Mon Sep 30, 2019 8:36 pm

Hi ,

I am integrating ranorex with DevOps Azure, and it integrated successfully.
I can execute .exe using command line for windows application and web based application, and that will start executing test cases.
But How I can execute .exe for android platform , do I have to make android device connected to my remote server and do I need to installed application in advance before starting testcase , or there is a way to make deployment using command line and then need to execute .exe for android ?

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

Re: How to execute android testsuite .exe file using command line

Post by odklizec » Tue Oct 01, 2019 11:21 am

Hi,

Command line instrumentation and deployment of mobile apps is possible. Please check this user guide chapter:
https://www.ranorex.com/help/latest/int ... g-started/
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

priyank1989
Posts: 20
Joined: Wed Aug 14, 2019 8:59 pm

Re: How to execute android testsuite .exe file using command line

Post by priyank1989 » Wed Oct 02, 2019 3:45 pm

I tried command line deployment and I mange to deploy it using CLI, but still we need to manually install on device after successful deploy is there any way which can also install automatically on device.
As my plan is like using devops pipeline , 1. create build , 2. Deploy it on device , 3. Install it on device, 4. Perform automation testing

So from above 4 steps, Now I can manage 1,2 and 4 , but still step 3 I have to do manually.
So let me know if there is a way to install it automatically or not

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

Re: How to execute android testsuite .exe file using command line

Post by odklizec » Thu Oct 03, 2019 7:33 am

Hi,

I don't quite understand what you mean by "Install it on device"? Deploy step, if finished properly, should install the app on device? What exactly you have to do manually?
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

priyank1989
Posts: 20
Joined: Wed Aug 14, 2019 8:59 pm

Re: How to execute android testsuite .exe file using command line

Post by priyank1989 » Thu Oct 03, 2019 3:04 pm

if deploy will get success you will get one popup on device to install application, I attached screenshot for that
Attachments
Screenshot_20191003-090238.png
Screenshot_20191003-090238.png (260.34 KiB) Viewed 85 times

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

Re: How to execute android testsuite .exe file using command line

Post by odklizec » Thu Oct 03, 2019 3:19 pm

Hi,

Does the same happen if you instrument and deploy app manually, via Ranorex instrumentation wizard? And have you tried to uninstall the app from device, before instrumentation and deployment?
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

priyank1989
Posts: 20
Joined: Wed Aug 14, 2019 8:59 pm

Re: How to execute android testsuite .exe file using command line

Post by priyank1989 » Thu Oct 03, 2019 3:28 pm

Yes I uninstalled previous one, but is that compulsory to uninstall as what if I want to installed new build (updated version) on existing one.
and yes on wizard it install automatically didn't pop up for manual install

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

Re: How to execute android testsuite .exe file using command line

Post by odklizec » Thu Oct 03, 2019 4:04 pm

Hi,

I believe that instrumentation wizard uninstalls existing app before installing new one? Which means that in case of command line instrumentation and deployment, you have to specify that you want to uninstall app, before installing new one? I’m not sure if there is such command in instrumentation command line, but I’m sure you can uninstall an app via ADB command. In fact, Ranorex instrumentation wizard does deployment via adb command line too 😉
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

priyank1989
Posts: 20
Joined: Wed Aug 14, 2019 8:59 pm

Re: How to execute android testsuite .exe file using command line

Post by priyank1989 » Thu Oct 03, 2019 4:44 pm

ok so its all about deplymode, if you set deploymode it will automatically install application.
I can install test apk but while O tried to install my actual .apk it is giving error as below

Process did not finish within the specified timeout of '00:01:00'

so is there any way using commandline where I can extend timeout

priyank1989
Posts: 20
Joined: Wed Aug 14, 2019 8:59 pm

Re: How to execute android testsuite .exe file using command line

Post by priyank1989 » Thu Oct 03, 2019 4:46 pm

Got the answer we have to use /it:"300000", this will help you extend timeout

priyank1989
Posts: 20
Joined: Wed Aug 14, 2019 8:59 pm

Re: How to execute android testsuite .exe file using command line

Post by priyank1989 » Thu Oct 03, 2019 5:00 pm

yeah, so finally we can close this thread as I can update apk using command line there is no need of any extra parameters, it is taken care automatically, what help me is just /deploymode:"Usb" /dt:"300" /it:"300"

So thanks for your support