LoadRunner/VuGen supports both Web (HTTP/HTML) virtual users and Media Player (MMS) vusers, but it does not allow you to create a multiple protocol script using these two protocols.

Fortunately, with a little bit of hacking, you can create a multi-protocol vuser with these two protocols yourself.

The steps to follow are:

  1. Record your application using the Media Player (MMS) vuser. A typical application might be a webpage with a Windows streaming media component.
  2. Record your application using the Web (HTTP/HTML) vuser type. Put lots of comments in your script to help you when merging the scripts.
  3. Merge the scripts. Cut and paste the code from MMS script into the Web script in the appropriate places. In the globals.h file, add #include "mic_media.h"

If you try to run the script at this point, you will get the following error on replay:

Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(5): Registering web_reg_save_param was successful  	[MsgId: MMSG-26390]
Action.c(12): web_url("Games") was successful, 114051 body bytes, 229 header bytes, 117 chunking overhead bytes  	[MsgId: MMSG-26385]
Action.c(39): Notify: Transaction "test" started.
Action.c(41): Error: C interpreter run time error: Action.c (41):  Error -- Unresolved symbol : mms_play.
Action.c(41): Notify: CCI trace: Compiled_code(0): Action()
.
Notify: Transaction "test" ended with "Stop" status (Duration: 0.0524).
Ending Vuser...

The Replay Engine cannot find the function named mms_play. This can be fixed by modifying the *.usr file to include the MMS protocol.

Change all occurrences of "QTWeb" to "MMS,QTWeb":

Change [General]
Type=Multi
AdditionalTypes=MMS,QTWeb
ActiveTypes=MMS,QTWeb
GenerateTypes=MMS,QTWeb

Web (HTTP/HTML) + Media Player (MMS) vuser type

It really is that simple...

Note that to replay successfully in the LoadRunner Controller, you must still be licensed for both virtual user types.

Tech tips from JDS

2 comments

Open .user file with notepad. The file wit icon to open VUgen in scripts folder :)

Hi,
I tried to follow the steps and included #include mic_media.h into Globals.h
On replay, it fails throwing “Unable to resolve mms_play” error. I’m unable to follow the next step. Exactly which file should I modify to include MMS,QTWeb.

Pls suggest.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.