If you’ve ever worked with RDP VuGen scripts, you’ll know it can be challenging to develop a reliable script. This applies if you need to generate high load via LoadRunner RDP scripts for performance testing. It also applies if you need reliable RDP scripts over time as part of a monitoring solution using Business Process Monitors (BPM)s in HP BSM. Differentiating between false errors and real errors with RDP VuGen scripts can be time consuming and drive you insane.
Over and above writing a robust RDP VuGen script, here are some tips to more reliably run RDP scripts in either LoadRunner or HP BSM. We have successfully run 250+ concurrent RDP user tests with no errors using a combination of the below, even without the RDP agent using LoadRunner. There are a number of additional techniques to make RDP scripts more reliable but these are beyond the scope of this article.
Script Run-Time Settings:
RDP Synchronization Image Tolerance:
Set the default tolerance for image synchronization to Exact. This should be the global setting. You can relax the tolerance on a case by case basis in the rdp_sync_on_image function using "Tolerance= Medium" where tolerance can be Exact, Low, Medium or High.
RDP Synchronization Typing Speed:
Set the typing speed (msec/char) to at least 300 (msec/char). In some cases the script will still run faster in LoadRunner than you want it to, in which case you can try increasing the typing speed further.
RDP Server settings:
RDP-tcp Session Properties:
Set your Terminal Server settings to automatically end disconnected sessions after 1 minute. This will ensure that any disconnected/hung sessions are automatically logged out so the next user can pick up a “clean” session. If allowed also set Active and Idle session limits to Never. This will ensure there will be no limits to how long a user can be active or idle in the RDP session.
These options are found in Remote Desktop Session Host Configuration > Properties > Sessions Tab.
- End a disconnected session: 1 minute
- Set Active session limit: Never
- Idle session limit: Never
Still having problems?
Connection Reset by Server Errors.During test execution on the LR Controller, you are getting the following error:-202930 xxx.c(xx): Error:Connection reset by the server
Generally this is a difficult error to find the root cause for but if you have a scenario with large think-time and/or pacing (minutes) and find that your vusers are failing with the above error, we suggest you try this first.
Increase the Socket receive buffer size (bytes) in Run-Time settings. This option is found under Run-Time Settings > RDP > Advanced > Socket receive buffer size (bytes).
VuGen has a description as follows:
The amount of bytes to allocate for the socket’s receive buffer. If the buffer is too small, it can fill up causing the server to disconnect. If the buffer is too large, it uses more local system resources (non-paged memory) and can slow system performance.