Safe disconnect Ranorex from device
Posted: Mon Sep 21, 2015 6:42 am
Hi,
I'm doing mobile testing using several virtual Android devices on VmWare Workstation. I'm doing so using user code implementation.
Because of an issue VmWare has I need to power cycle each VM after 20 times suspending it bacause otherwise it will fail after a while - but this is another issue...
My first implementations just power cycled the VMs and after that reusing the (old) still existing Ranorex connection to the device which in general still works (for sure it is reestablished by Ranorex after power cycle). After some hours (and hundrets of cycles) I'm faced with an enormous delay/hang of the ranorex connection to ALL devices I'm connected to.
After I found this issue I decided to better explicitly disconnect the device from Ranorex before power cycling but found NO METHOD TO DISCONNECT. Than I decided to power down the VM and after that to reconnect and synchronize to the still powered off device. Than I'm waiting for the channel to close (what without a dedicated method more or less means to wait for the connection to timeout). After that I restart the VM establishing a new Ranorex connection to the device.
This sounds a bit strange but in general it's working. The backdraw is that it's very time consuming, not only for the one VM to disonnect and reconnect but also all other VMs seem to hang for the time doing so what leads to unpredictable timeouts also there which are hard to handle...
My Question: Could you please advise how I can perform a fast and safe device disconnect from Ranorex in user code? Maybe I'm just blind not finding the right method...
Thanks a lot and Kind regards,
Hardy
I'm doing mobile testing using several virtual Android devices on VmWare Workstation. I'm doing so using user code implementation.
Because of an issue VmWare has I need to power cycle each VM after 20 times suspending it bacause otherwise it will fail after a while - but this is another issue...
My first implementations just power cycled the VMs and after that reusing the (old) still existing Ranorex connection to the device which in general still works (for sure it is reestablished by Ranorex after power cycle). After some hours (and hundrets of cycles) I'm faced with an enormous delay/hang of the ranorex connection to ALL devices I'm connected to.
After I found this issue I decided to better explicitly disconnect the device from Ranorex before power cycling but found NO METHOD TO DISCONNECT. Than I decided to power down the VM and after that to reconnect and synchronize to the still powered off device. Than I'm waiting for the channel to close (what without a dedicated method more or less means to wait for the connection to timeout). After that I restart the VM establishing a new Ranorex connection to the device.
This sounds a bit strange but in general it's working. The backdraw is that it's very time consuming, not only for the one VM to disonnect and reconnect but also all other VMs seem to hang for the time doing so what leads to unpredictable timeouts also there which are hard to handle...
My Question: Could you please advise how I can perform a fast and safe device disconnect from Ranorex in user code? Maybe I'm just blind not finding the right method...
Thanks a lot and Kind regards,
Hardy