Error: “The default Results Directory is locked”

If a message box with the error "The default Results Directory is locked" appears when you replay a script in VuGen after a VuGen crash. The crash locks the current Results directory and no longer allows results to be written to it.

To resolve this issue, Check for any instance of mmdrv.exe in the Task Manager

Close VuGen, and check for any instance of mmdrv.exe in the Task Manager; if there is one, end this process. This will unlock the current result directory.

Advertisements

Add row, Add column, etc. buttons are disabled

When viewing a script, which has parameters in it, in VuGen, the Add row, Add column, etc. buttons are disabled.

This is because the parameter data file has more than 100 rows but the parameter data file has a limit of 100 rows

The Add row, Add column, etc. buttons under the Parameter properties in VuGen are disabled if there are 100 or more entries in the parameter data file.

However, more rows or columns can still be added or deleted by editing the file in Notepad and will be considered for parameterization purposes when running multiple Vusers.

Checking dates in VuGen

To check the dates against the system dates in VuGen :

VuGen provides a date/time parameter

VuGen provides the lr_save_datetime() function to create a date or time parameter.

This function can be used to get date or time values in multiple formats. It also allows for offsets from the current system date/time. For more details and examples, see the Online Function Reference Guide.

Once the date has been saved into a parameter, you can convert to a string using the lr_eval_string function. Comparison or other operations can then be applied to it using standard ANSI C string functions.

Creating Regular Expressions in JMeter

Creating Regular Expressions
Regular expressions can be a bit daunting at first, so here is a suggested procedure to help create them.

Getting Started
Ensure you have an exact copy of the source document that you want to operate on.

One way to do this is to attach a Save Responses to a file Listener to the Sampler, and run the test to create a copy of the resource.

You can then use the HTTP Sampler with the “file:” protocol to retrieve the page at any time.

Extract the section you are interested in
Find the variable part that you want to extract (in the file, or in the Tree View Listener), and start by using that as the regular expression.

For example, suppose you want to find the value from the following snippet:

input type=”hidden” name=”secret” value=”CAFEBABE.12345(3)”

Start with exactly that as the regular expression, and check that it works, for example in the Tree View Listener Regex tester panel.

If not, examine the expression for any meta-characters (characters that have a special meaning in regexes).In this case, the only special characters are the “.” and the parentheses “(” and “)”.These need to be escaped, by being prefixed with “\”. We now have:

input type=”hidden” name=”secret” value=”CAFEBABE\.12345\(3\)”

This should now match the whole phrase.

The next stage is to tell the regex processor which part of the section you want to use. This is easy, just enclose the characters in parentheses.

So assume you want to match just

CAFEBABE.12345

Your regular expression then becomes:

input type=”hidden” name=”secret” value=”(CAFEBABE\.12345)\(3\)”

Fix the expression so it matches variable text

Of course, the previous expression is not much use, as the text it matches is already known. We want to match variable text, so we have to replace the fixed characters of the target text with meta-character expressions that will match all possible variations of the target.

This requires knowledge (or a good guess) as to what possible characters can be used in the target.

In this case, it looks as if there is a string of hex characters followed by a number, followed by a digit in parentheses.

A digit is easy, that’s “\d”, so a number is “\d+”, where the “+” means one or more of the previous item.

A hex character can be represented by “[0-9A-Za-z]”. The enclosing “[ ]” create a ”character class” which matches one of the specified characters.
The “-” here means a range.

So putting that together, we get:

input type=”hidden” name=”secret” value=”([0-9A-Za-z]+\.\d+)\(d\)”

Now suppose we wanted to match the whole of the value. We could move the closing capture parenthesis to the end of the value.

This would be suitable if there were other values with different patterns that we did not want to match.

However, if we just wanted to capture the quoted value, then we could use:

input type=”hidden” name=”secret” value=”([^”]+)”

The character class in this case is ”[^”]” which means any character except double-quote. The “+” suffix means we want as many as there are in succession.

This will take us up to the end of the value.

Hints and Tips

If the expression matches more than once in the source, you have a choice:

* specify which match to use
* extend the expression to include more context at the beginning or end so the match is unique

“java.lang.OutOfMemoryError: Java heap space” error while generating Flex script

If "java.lang.OutOfMemoryError: Java heap space" error is displayed while generating Flex script.

Once the recording was complete when the script was generated , an pop-up appears which indicates there was a java heap space issue for certain amfsecure calls.

This is because the AMF calls are too large and default body size does not work.

To resolve this issue

1. Apply patch KM1363363 fixes.

2. Make sure to use JRE version 1.6.0_16 or up to 1.6.0_22.

Original JRE with LR 11.04 is 1.5

Rename original <LR-install-folder>/JRE and copy the 1.6 JRE folder as LR/JRE.

Verify java -version indicates 1.6 version.

3. Search for vugen.ini file and backup original file. Now edit the file and update as follows

[WebRecorder]

BodySize=4000000

If the section "[WebRecorder]" is already present in the file then just add the next line

or update the number accordingly.

Save the file and restart the Vugen

4. In VuGen the recording options -> Flex -> Externalizable objects.

Only add flex-messaging-common.jar and flex-messaging-core.jar provided as part of the all-solution patch.

5. Regenerate the script.

Script should be regenerated without OOM errors.

Error : Vuser failed to initialize extension LrXml.dll displays when trying to replay a script

If one or more of the following errors come while running script.

27279 – Report Initialization

10700 – Error Vuser failed to initialize extension LrXml.dll

Warning: Extension LrXml.dll reports error -1 on call to function ExtPerThreadInitialize. Error: Vuser failed to initialize extension LrXml.dll.

This is caused because there is a problem with result directory creation.

Complete the following steps to work around the issue:

Navigate to the following location: <LR>\\dat\\protocols

If it is web protocol, go to QTweb.lrp

if it is citrix protocol , go to citrix.lrp or citrix_ica.lrp

Go to LRP file based on the script being used,

Open the relevant file in a Notepad

Look for: ResultsDirUI=1

Comment it out by adding a semicolon. For example: ;ResultsDirUI=1

Save the changes to the file

Duration of a scenario calculation method if the Scheduler is used for ramping up Vusers

Measuring the duration of a scenario is done using the following method

If "Load all Vusers simultaneously" is enabled

The time specified in "Duration" tab starts when all the Vusers go into the "Init" state. If you use this option with "Initialize all Vusers before Run," the duration starts when the Vusers go into the "Run" state.

If "Start x Vusers every X (HH:MM:SS)" is enabled

The time specified in "Duration" tab starts when the last batch of Vusers go into the "Init" state. If you use this option with "Initialize all Vusers before Run," the duration starts when the last batch of Vusers go into the "Run" state.