Stress Testing The WinFrame Server
Using LoadRunner & WinRunner

(Page 3)

When to Slow Down...

After reading the last section, you might be surprised to find that sometimes you might want to slow the action down a little. Why? Well, because of the way the windows are stacked, every time you bring a window to the foreground, the WinFrame server has to resend the whole window's information, instead of just the portion that has changed. Occasionally, depending on network speed, Window's repainting speed, a WinFrame session will miss recognizing the action performed on it.

This, fortunately, happens only occasionally on certain machines only. In addition, I've only noticed this happening with mouse actions (click, double click, drag). Keyboard types are almost always recognized correctly, so you might want to to consider this.

If you have no choice but to use mouse actions, what you can do is put a delay after the click (one second is enough), so that the WinFrame window gets a chance to receive the action before moving on to the next window. In the module that has been made available, these will be the _delayed functions.

Using the Module

In order to use the module, all you have to do is load the compile module using the load() or reload() function. Then the rest of the script will look like a regular GUI virtual user script, with transactions and rendezvous as needed. I have tried to include as much of the regular GUI actions as possible into the module. In addition, I have included the text check (actually, it's really text wait) functions that can be used to verify the end of a transaction.

Some of the text wait functions will actually allow you to specify a transaction as a parameter. When the text has appeared, the function will execute the end_transaction() command on the transaction parameter specified before returning. This is more of a convenience than anything else.

Certain functions also optionally accepts both a rendezvous and transaction names. This is typically for the menu selection function (if you decide to use it), where you'll usually want to synchronize the action just prior to executing the menu item selection. Again, this is mainly for convenience than anything else.

There are also functions (those that end with _delayed) that allow you to incorporate some delay either before or after the GUI action, or even both.

Creating the Script

Well, sooner or later, it'll come down to work. Unfortunately, this is the most tedious part.

First of all, create the GUI file entries for the WinFrame session windows. Use the create_duplicate_GUI_window() function in the module to quickly create the GUI file entries.

The easiest way to create the actual script is probably to record the script on one WinFrame session. WinRunner will record mouse clicks as regular win_mouse_() commands, and keystrokes as type() commands. During the recording, when you want to to perform text checks or waits, use WinRunner's "Get Text - Area" button ( ).

Later on, all of these recorded mouse or keyboard actions will later have to be changed to the multiple_win_mouse_ () commands and multiple_win_type() commands; while the get_text () commands will have to be changed to multiple_win_wait_text() or multiple_win_wait_text_transaction() commands.

For bitmap checks, change the recorded commands to the multiple_win_wait_bitmap() command. I have not thoroughly tested the bitmap wait function, but I think that it should work fine. You might have to turn off the "Break on mismatch" checkbox in the option menu, though, or else WinRunner will always pop up message to inform you that the bitmap wait could not find the bitmap.

That's all you need in a nutshell. There are several other functions included in the module that I have not explained here, but I have provided descriptions and short examples for them in the module itself. If there's enough demand, or if I find enough free time, I'll try to put up a sample test script that everyone can use as a guide.

Any additional questions, feel free to email me.

Download Location

All righty then. You can download the modules at the following location:

 

previous


Tech Page @ itechnologist.com