Introduction to RDP Protocol in LoadRunner
We all know that LoadRunner has nearly about 50 protocols. Let get little familiar with one of the unfamiliar protocol i.e. Microsoft RDP protocol which is Packaged as a separate License.
What is RDP?
The Remote Desktop Protocol shortly called as RDP allows User to remotely connect any authorized computer. Terminal Server is an add-on to Microsoft Windows Server. It allows you to run sessions on the server from a local computer. When you log into a terminal server from a local computer, it does all of the processing on the server and presents the client with a GUI that shows what is happing on the server. RDP is the protocol that is used to connect the local client to the Terminal Server.
How RDP Works:
When a user logs on to a Terminal Server machine, the user is basically seeing a picture of what is happening on the server. As the user types and clicks, the picture displayed to the user is refreshed. Because of this, LoadRunner has no idea what is shown on the screen to the user. All it can see is a picture. This is important to keep in mind when replaying the script because synchronization points will have to be setup to make sure that the script replays correctly
Pre-request for recording a RDP Script:
- Select Single or Multi Protocol as per the requirement
- Record the Connection Process in vuser_init and closing process in vuser_end section.
- Running a Clean Session: Record all business transaction in Action Section and after recording close all the process (windows), so the next time a completely new session can be established.
- While recording the business transaction, click on each and every option that we need to record because the Remote Protocol won’t record any other action (Mouse Over, etc) except clicking.
- It is Possible to edit the recorded script in case of any change even though it is not recommended due to frequent change in position of objects and clicks made on them.
Code generation option-Basic: The Basic Code Generation Options control the way VuGen creates a Script—the level of detail, triggers, and timeouts.
The Script generation level can be High, Low or Raw.
- High Level: High Level Script generation captures the keyboard events as rdp_type calls.
- Low Level: Generate low level scripts. E.g. Key up/down captured as rdp_key events
- Raw level: Generates a script on a raw level, by extracting input events from network buffers and generating calls in their simplest form: key up/down, mouse up/down/move.
Code generation option-Advanced:
The Advanced Code Generation Options control the way VuGen creates a script – default parameter name prefixes and other options.
Code generation option-Agent:
The Agent Code Generation Options control the way the agent for Microsoft Agent for Terminal Server functions with VuGen during recording
To create RDP Script:
- Select File > New or click the New button. The New Virtual User dialog box opens.
- Select Microsoft Remote Desktop Control Protocol (RDP). The Start Recording dialog box opens.
- Click Options to set the Recording Options.
- Select the RDP: Login node. Select one of the session options: Run Client, Connection File, or Default Connection File.
- Select the RDP: Code Generation node and enable the desired options.
- During recording to select a screen region for synchronization, click the Sync on image button on the recording toolbar and indicate an area for synchronization.
- Stop recording and save the script.
If the Client sends the server the same data as it is received, then Vugen replaces the sent data with parameter during code generation.
To run an RDP script:
- Open the Run-Time settings dialog box. Click the Run-Time Settings button on the toolbar, or select Vuser > Run-Time Settings.
- Select the Configuration node. Select the desired settings.
- Select the Synchronization node. Select the desired settings.
- Click OK to accept the run-time settings and close the dialog box.
- Click the Run button or select Vuser > Run.
General Problems and Solutions:
MSTSC Version Issue: LoadRunner v9.52 won’t support the RDP Version more than 5.1
Solution: Need to install LoadRunner V11.5 which supports RDP Version from 5 to 7.
Connection Reset by Server Error: While running the Script for time in Controller “Connection reset by server” error at the rdp_sync_on_agent function occurs.
Solution: When using the RDP protocol with the RDP agent, always insert some type of image sync on the screen. This will ensure that the script does not try and synch with the RDP agent before you’re actually logged in.
Multiple Authentication problems: Each time the user access the web site, they are required to enter authentication twice. Once when opening the site, and then again when opening an application that is posted.
Solution: Set the encryption level of the connection between the client and the remote computer by enabling the Set client connection encryption level Terminal Services Group Policy setting.
Though RDP Protocol is pretty similar to Citrix Protocol, It has lot of nice features like shifting coordinates and tolerance that other protocols don’t have.