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).
- 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.
- 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).
- 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.
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.
Just to recap…
- 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.