Creating a Web + MMS vuser

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:

1
2
3
4
5
6
7
8
9
10
11
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”:

1
2
3
4
5
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.

 


Related posts:

  1. WDiff Replacement for VuGen One of the quick ways to identify those areas in...
  2. Parameterising Unix/Posix timestamps in VuGen A common question from people creating web-based VuGen scripts is...
  3. DNS-based load balancing for virtual users In DNS-based load balancing, a website visitor will request a...
  4. VuGen Code Snippets This is a repository of code snippets. Please send me...
  5. VuGen Feature Requests VuGen is a great tool for developing scripts to emulate...


Bookmark using any bookmark manager!

 

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply