I can run my app on the Android device from my development PC no problem. This is the one with the node-locked license.
It fails waiting for the device when I try to run it from Jenkins: Device WaitFor(DeviceConnected) timed out. ConnectTimeout: 00:05:00
The Jenkins Slave PC has the Floating License.
The only thing can think of that may have changed is that I Re-Instrumented the Application on this device yesterday.
Why is it failing?
It must be something to do with the device (a Samsung Galaxy tablet) because when I switch it to run on the 'Nexus 4' it works!
$varAndroidDevice = 'GT-N5110', $varAndroidApp = 'uk.co.documotive.mobile.documobile.agile'
[2016/03/16 12:57:08.091][Info ][Info]: Starting Android App: uk.co.documotive.mobile.documobile.agile on Device: GT-N5110
[2016/03/16 12:57:08.139][Info ][Log]: Starting Android App: uk.co.documotive.mobile.documobile.agile on Device: GT-N5110
[2016/03/16 13:02:08.462][Error ][Module]: Device WaitFor(DeviceConnected) timed out. ConnectTimeout: 00:05:00
Code: Select all
Report.Log(ReportLevel .Info , "Log", "Starting Android App: " + varAndroidApp + " on Device: " + varAndroidDevice);
bool resetInitialState=true ;
Host.Local.RunMobileApp(varAndroidDevice, varAndroidApp,resetInitialState);
Report.Info ("Android","Android App: " + varAndroidApp + " started on Device: " + varAndroidDevice);
Code:[2016/03/16 12:57:01.260][Info ][Info]: Adding device: GT-N5110, IP Address: 172.16.182.174.
[2016/03/16 12:57:01.332][Info ][Info]: Wait for device: GT-N5110, IP Address: 172.16.182.174 to be connected.
[2016/03/16 12:57:05.377][Info ][Info]: Device: GT-N5110, IP Address: 172.16.182.174 connected.
[2016/03/16 12:57:07.871][Info ][Info]: Device: GT-N5110, IP Address: 172.16.182.174. Wait for 365Agile to run.
[2016/03/16 12:57:07.960][Info ][Info]: Device: GT-N5110, IP Address: 172.16.182.174 365Agile connected.
Code: Select all
string deviceName=varDeviceToAdd ;
string ipAddressOfDevice=varDeviceIpAddress ;
Report .Info ("Info","Adding device: " + deviceName + ", IP Address: " + ipAddressOfDevice + ".");
var device = RemoteServiceLocator.Service.AddDevice(
deviceName,
RemotePlatform.Android,
RemoteConnectionType.WLAN,
ipAddressOfDevice);
Report .Info ("Info","Wait for device: " + deviceName + ", IP Address: " + ipAddressOfDevice + " to be connected.");
device.WaitFor(ChannelState.DeviceConnected);
Report .Info ("Info","Device: " + deviceName + ", IP Address: " + ipAddressOfDevice + " connected.");
var firstApp = device.RanorexCompatibleApps[0];
device.StartApplication(firstApp);
Report .Info ("Info","Device: " + deviceName + ", IP Address: " + ipAddressOfDevice + ". Wait for " + firstApp.DisplayName .ToString () + " to run.");
device.WaitFor(ChannelState.AppConnected);
Report .Info ("Info","Device: " + deviceName + ", IP Address: " + ipAddressOfDevice + " " + firstApp.DisplayName .ToString () + " connected.");