In QTP/UFT automation suite execution,we may require to connect remotely to multiple machines through remote desktop connection for monitoring test execution, We may face issue in remote connection being disconnected due to network issues/remote sessions.
To allow smooth test execution, we should reconnect to the remote sessions in case of any network disconnect. In this post, I will share what we can do to reconnect remote connection in case of session disconnect due to network issues and failures.
- Using experience in Remote Desktop Connection
- Go to Run>mstsc
- In Remote Desktop connection window, Go to Experience Panel.
- Select checkbox "Reconnect if the connection is dropped"
By default, a maximum of twenty reconnection attempts are made at five second intervals.
- Defining Group policy for Remote Desktop connection
- Navigate to group policy for the machine
- Navigate to run> gpedit.msc
- Local group Policy editor Window is displayed.
- Click on Administrative Templates\Windows Components\Remote desktop Services\Remote Desktop Session Host\Connections
- Policy Settings
- Automatic Reconnection- If policy setting is enabled, automatic reconnection is attempted for all clients running Remote Desktop Connection whenever their network connection is lost.
- Configure keep-alive connection interval - This policy setting allows you to enter a keep-alive interval to ensure that the session state on the RD Session Host server is consistent with the client state. If you enable this policy setting, you must enter a keep-alive interval. The keep-alive interval determines how often, in minutes, the server checks the session state. The range of values you can enter is 1 to 999,999.