VuGen is a great tool for developing scripts to emulate business processes for performance testing or application monitoring, but there are small number of changes that would make it an even better tool.

Read on for my list of VuGen feature requests…

Note that the feature requests have been broken up into logical groups, and most are related to scripting for web-based applications (as these are by far the most common type of application that I see at JDS clients).

Functions

  • A web_reg_save_param function that will work on any string (or buffer), not just something returned by a web request.
  • With the increasing popularity of Ajax, I am finding it more common to have to correlate values in JSON format than in XML. VuGen has some good functions for manipulating XML data. HP needs to add equivalent functions for manipulating JSON data.
  • The web_reg_save_param and web_reg_find functions allows “text flags” that give primitive regular expression-like functionality. e.g. the following will match any number:
    web_reg_find("Text/DIG=Your order number is ######. Thank you for shopping with us.", LAST)

    But the matching abilities of these flags are really limited as they only allow you to match digits (#), or alphanumeric characters (^). It would be nice to add a text flag of /REGEX that would allow me to use Perl-compatible regular expressions in my web_reg_save_param and web_reg_find functions.

  • The web_convert_param function will convert the following:
    • HTML to URL Encoded
    • Plaintext to URL Encoded
    • HTML to Plaintext

    HP needs to add an option to convert the source string to HTML. I have found myself writing little find and replace functions to replace certain characters with their HTML entity value, and every time I wonder why the web_convert_param allows me to convert from HTML to plaintext, but not the other way around.

  • I am finding that I am using lr_user_data_point more and more when I need to create a custom monitor for a technology such as Tomcat that is not supported by the native LoadRunner monitors (or SiteScope). The problem is that my graphs get a bit cluttered. It would be good to have an additional argument to lr_user_data_point that would allow me to write my user data points into logical groups (one for Tomcat, one for MySQL etc).
    Also, lr_user_data_point should be made to work with BAC. Sometimes a SiteScope monitor cannot get monitoring data from a system component, and it is necessary to write a VuGen script (run as a BPM) to scrape the values. Then the only way to present this data in BAC is as a transaction response time, which is obviously lacking a little when it comes to displaying the data (this is even more important now that HP has removed the ability to write custom monitors in SiteScope).

Recording options and Code generation

  • When an application POSTs a big blob of XML or JSON data back to the server, it appears as just that, a big ugly blob of text in your VuGen script. This kind of data would be much easier to work with if it was presented in a readable, indented (and maybe even syntax highlighted) format. Recently I had to write my own tool to do pretty printing for XML data in VuGen scripts. It would be great if this was added as part of the tool.
  • Correlation Rules are extremely useful, but they should have the same options as the web_reg_save_param function that they automatically generate. For example, with web_reg_save_param, I can specify that I want to search the HTTP response headers for a value between particular left and right boundaries. With Correlation Rules, the only header values that I can save are cookies. Several times in the last year I have had applications which required correlation of response header values that weren’t cookies, and I had to manually correlate this value, rather than use a Correlation Rule.

Runtime Settings

  • When I am editing my Run Logic runtime settings, and I create a block that contains actions with a percentage next to them, I want to have better precision than integers will allow. I know that I can create sub-blocks as a hack to get fractional percentages, but this is messy.
  • The default runtime settings are really not great defaults. They could be changed to something more helpful and less dangerous.
  • I love ContentCheck Rules, but I always wish that I had the ability to execute some code when a particular Rule was triggered (maybe just enough to write some extra infomation to the output log).

User Interface

  • I use the Test Results window (View > Test Results) very frequently when scripting as it shows all the steps in your script with a green tick next to them if they succeeded, and a red cross next to them if they failed. I find it anoying that a step will still be marked with a green tick if you have a call to the lr_error_message function, and you have the “fail open transactions on lr_error_message” runtime setting enabled.
  • The Test Results window should also allow cut and paste (and view source) from the web page that is displayed. I frequently forget that cut and paste is broken in this screen and find myself trying to cut and paste error message strings from the web page that is displayed.

Scripting Language

It’s really rare to find anyone who graduated from university in the last 5 years who has actually been taught C programming.

Most people who think they can “get by” writing C code end up writing buggy code when they try to write their own functions. Most of the errors are due to not understanding strings or memory allocation in C, and the problems usually manifest as intermittent errors; either instability or garbled string values. Users typically blame the LoadRunner replay engine for not being stable, when it is their own code that is causing vusers to fail with runtime errors.

Any replacement language for C must be widely understood, safe (garbage collected, no playing with memory), and must have millions of third-party libraries available so I can use other people’s code when I need to do something that HP hasn’t thought of, or interface with something which has its own libraries (like a MySQL database, or a JMS queue).

In the meantime, I sometimes convert C-based web scripts into Java (usually when I need to use someone else’s libraries). The problem with this is that clients who are licensed for the Web/Multimedia vuser bundle cannot use the Java-based vusers without paying for an extra license. This is not a problem when writing BPM scripts, but feels very limiting when load testing.

Summary

Just to recap…

  • Functions
    • A web_reg_save_param function that can be used on normal strings (or buffers)
    • Functions to manipulate JSON data (just like the existing lr_xml_* functions
    • Regular expression support for web_reg_save_param and web_reg_find
    • Support for “TargetEncoding=HTML” to be added to web_convert_param
    • A group argument to be added to lr_user_data_point
    • Support for lr_user_data_point to be added to BAC
  • Recording options and Code generation
    • Pretty printing for XML and JSON data in the web_custom_request body
    • Correlation Rules that can save values from any HTTP header, not just from cookies
  • Runtime Settings
    • Fractional percentages (not just whole numbers) for the weighting of actions in Run Logic
    • Better default runtime settings
    • Callback functions for ContentCheck Rules
  • User Interface
    • Calling the lr_error_message function should make a step appear as failed in the Test Results window
    • The Test Results window should allow cut and paste from the web page that is displayed
  • Scripting Language
    • C sucks and people don’t know how to use it. Consider switching to a more friendly language.
    • Include the Java web vuser with the license for the Web-Multimedia vuser bundle. I shouldn’t have to purchase another license if I want to convert my web scripts to Java.

Please leave a comment with any feature requests that you have, or any support for the features that have been already requested.

15 comments on “VuGen Feature Requests

  1. Hi,
    I am new to Load Runner and don’t know much technically about load runner. I am facing big problem during executing the load script which was recorded in load runner. In the script, that are few web request record like following.

    flex_web_request(“DatabaseService”,
    “URL=https://qa.classworks.com/load.classworks.com/TeacherModule/”
    “DatabaseService”,
    “Method=POST”,
    “Resource=0”,
    “RecContentType=application/json”,
    “Referer=https://qa.classworks.com/load.classworks.com/TeacherModule/”,
    “Snapshot=t4.inf”,
    “Mode=HTTP”,
    “EncType=text/x-gwt-rpc; charset=utf-8”,
    “Body=7|0|7|https://qa.classworks.com/load.classworks.com/TeacherModule/|73F06E6B29C21969BEB0B4E38203C6C3|com.Classworks.Teacher.client.servletservices.DatabaseService|login|java.lang.String/2004016611|sanjayn|8d788385431273d11e8b43bb78f3aa41|1|2|3|4|3|5|5|5|6|6|7|”,
    LAST);

    flex_web_request(“Buchheim_6”,
    “URL=https://qa.classworks.com/load.classworks.com/TeacherModule/”,
    “Method=POST”,
    “Resource=0”,
    “RecContentType=application/json”,
    “Referer=https://qa.classworks.com/load.classworks.com/TeacherModule/”,
    “Snapshot=t18.inf”,
    “Mode=HTTP”,
    “EncType=text/x-gwt-rpc; charset=utf-8”,
    “Body=7|0|21|https://qa.classworks.com/load.classworks.com/TeacherModule/|D863B97994873FD437F46BDFDDFEC6ED|com.Classworks.Teacher.client.servletservices.Buchheim|createClass|java.lang.String/2004016611|java.util.ArrayList/4159755760|andy333||29|1|[Ljava.lang.String;/2600011424|31|GAstudent1, GAstudent1|32|GAstudent2, GAstudent2|33|GAstudent3, GAstudent3|34|GAstudent4, GAstudent4|35|Kumar, Vijay|1|2|3|4|7|5|5|5|5|5|6|6|7|8|9|10|10|6|5|11|2|12|13|11|2|14|15|11|2|16|17|11|2|18|19|11|2|20|21|6|0|”,
    LAST);
    When i run the recorded script i got the “HTTP Status 405 – HTTP” error as it is considering https://qa.classworks.com/load.classworks.com/TeacherModule/DatabaseService as url. So please suggest me what changes need to be applied to over come this error.

  2. I found a bug with VuGen.

    When the recording option for “generate web_reg_find functions for page titles” is enabled, and the page title is empty (i.e. “”), VuGen will generate a web_reg_find like this:

    web_reg_find("Text=Untitled", 
    	LAST);

    …even though the word “Untitled” is not on the page.

  3. VuGen 9.5 Recording doesn’t work on 64 bit windows. This sucks because my Controller and load generators are running on 64 bit windows. Analysis also fails. Get with the proram HP!!!

  4. The Replay Log display is horrible. There have been many times I’ve needed to work with raw log data (e.g. identifying large, multi-line boundaries for web_reg_save_param) yet the Replay Log adds a lot of pretty useless meta-data to the display that just gets in the way (e.g. ‘Action.c(280): ‘). Sure that meta-data has its value, occasionally, but I’d really like to see some of the features and display found within the WebProxy tool that comes with HP WebInspect built into Vugen!
    Also the highlighting of any line in the Replay Log that contains the word ‘error’ is naive, so many times I find red highlighting on JavaScript code that handles errors but does not actually indicate a manifested error.

  5. 1. Regex support for web_reg_save_param and web_reg_find functions.
    2. Out of the box VTS support.
    3. Output logs in XML format.

  6. I’m planning to release that library under an open source license for exactly that purpose.

    As for callbacks – ah, I see what you mean there. No, that’s really something HP would have to solve ;-)

  7. Some of the problems with C can be mitigated by writing a ‘safe to use’ function library. I’ve created something like that which contains common string handling functions but uses parameters to hide all the memory management stuff from the scripter. It also contains a function that will parse an existing parameter and process it as if you had used a web_reg_save_param() call on the original contents.

    As for ContentCheck rules: You can use web_reg_global_verification() instead. That method is a lot more flexible too since it means you can turn rules on and off at will.

    Having regexp support for web_reg_find() and friends has topped my list too for a while now though, it would simplify life so much ..

    1. Floris, it would be great to share your LoadRunner function library and help all the junior load testers who don’t have an experienced person to write functions for them. :)

      The point about allowing callback functions for Content Check rules also applies to the web_reg_global_verification() function. I would find it really useful to be able to write a function that is automatically called whenever the web_reg_global_verification() function matches a known error message.

      Cheers,
      Stuart.

  8. There appears to be a bug in LoadRunner 9.5, where if
    Runtime Settings > Internet Protocol > Preferences > Options > DNS Caching is set to Yes, then the replay engine will cache the result of the DNS lookup between iterations when “New user on each iteration is selected”.

    This is unexpected behaviour, as I would expect a “new user” to have to perform a DNS lookup rather than use the value retrieved by another user.

    This can be tested by changing your hosts file halfway though a test.

    Cheers,
    Stu.

  9. Highlighting all instances of a string when the same string is selected like notepad++, would make corellating easier.

    ctrl-c copy from server response/test results and regexp would be really great though.

  10. Regular Expression support is certainly a major feature request for VuGen. It’s interesting to note that the new web_reg_cross_step_download function has some level of Regular Expression support.

  11. you should be fixing bug that Correlation Rules don’t work when application has large VIEWSTATE????

    and i laught when i see speed simulation say DSL is 512kbps and who use 14kbps modem anymore???

  12. Maybe Mercury was trying to make a better lr_user_data_point when they added the web_report_data_point function??

    But I can’t really see the point of web_report_data_point. What does it do that VuGen doesn’t already do with its error handling? Even the example from the Online Function Reference is useless as it is just a re-implementation of functionality that VuGen already does out of the box!

Leave a Reply