Set ConnectTimeout

Mobile Testing, Android App Testing.
sboeck
Posts: 8
Joined: Tue Nov 29, 2016 12:19 pm

Set ConnectTimeout

Post by sboeck » Thu Apr 27, 2017 9:19 am

Hello,

we are currently testing ours iOS App and came across the communication timeout exception.
We now would like to increase the timeout as stated in this thread.

Is there any way to do this via code?

Greeting sboeck

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

Re: Set ConnectTimeout

Post by odklizec » Thu Apr 27, 2017 9:29 am

Hi,

Yes, it should be possible to set ConnectTimeout via code. Check this post:
runmobileapp-specifying-the-timeout-t6711.html#p27768
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

sboeck
Posts: 8
Joined: Tue Nov 29, 2016 12:19 pm

Re: Set ConnectTimeout

Post by sboeck » Thu Apr 27, 2017 10:03 am

Thank you very much. Indeed it is possible too set the ConnectTimeout with Ranorex.Plugin.Mobile.RxIntegration.MobilePluginConfig.ConnectTimeout. Unfortunately the connection to our App still times out.

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

Re: Set ConnectTimeout

Post by asdf » Thu Apr 27, 2017 2:54 pm

Hi Sboeck,

I would try to reinstall the latest Ranorex service application on your device. I had the same issue after upgrading my Ranorex studio and not my service app accordingly.

Hope this helps.

sboeck
Posts: 8
Joined: Tue Nov 29, 2016 12:19 pm

Re: Set ConnectTimeout

Post by sboeck » Tue May 02, 2017 7:06 am

Hi asdf,

we already tried reinstalling the service app but it didn't help. Unfortunately we still get a timeout while starting our app.

But we found another solution to our problem. Basiclly we just try to reconnect a few more times until it works or we give up. With this solution we can start our application without a exception. Until now it always started the app after the first call of Service.Reconnect().

Here an excerpt of our sourcecode:

Code: Select all

string device = "Our devicename";
for(int i = 0; i < 10; i++){
	try{
		// Start application
		Host.Local.RunMobileApp(device, Repository.Instance.APPTITLE, true);
		break;
	}catch (Exception e){
		// Reconnect device
		RemoteServiceLocator.Service.GetByDisplayName(device).Reconnect();
	}
}

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

Re: Set ConnectTimeout

Post by odklizec » Tue May 02, 2017 7:17 am

Hi,

Are you connecting via USB or WIFI? I guess USB, right? Try connecting via WIFI, which is more stable and and also faster.
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

sboeck
Posts: 8
Joined: Tue Nov 29, 2016 12:19 pm

Re: Set ConnectTimeout

Post by sboeck » Tue May 02, 2017 10:28 am

Hello odklizec,

yes you are right. We connect the devices via USB. Unfortunately WIFI is no option for us.

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

Re: Set ConnectTimeout

Post by asdf » Thu May 04, 2017 11:56 am

Hi sboeck,

Since this I would suggest forwarding your issue directly to Ranorex support([email protected]). Ranorex support can analyze it and eventually provide a solution for your problem.