Subscribe by Email


Saturday, July 28, 2012

What is virtual user script? Why do you need to parametrize fields in your virtual user script?


Nowadays, the concept of the virtual user is quite common in the field of load testing. 

What is a Virtual User?


- Virtual user is one of the quite useful tools have been ever invented in the field of software engineering. 
- Virtual users can be used in a number of ways for testing load, stress or capacity of any software system or application you want. 
- It will be the easiest to define a virtual user as a virtualized representation of a real world user which has been specifically designed for simulating the same interactions and behaviors with the software system or application or web site to be tested in a way that a real world user would do exactly. 

Let us take an example, suppose at a peak your web site got 100 users over a particular hour. It becomes quite easy for you to simulate the same behavior using 100 virtual users making use of the scripts that invoke quite similar interaction and the navigation exactly as your real users do. Today such virtual users are also available that can playback the recorded scripts. 

In this article we discuss about what a virtual user script is and what is the need for parameterizing the fields in a virtual user script.  

What is a Virtual User Script & Need to Parametrize fields?


The fact that almost all of the scripts of the virtual user are automated is quite common. 
- For each and every automated script a particular entry point is marked by the script statement in virtual user. 
- From this point, the actions of the automated scripts are much similar to that of the real world users. 
- At any point these virtual user scripts can be made to click on any of the buttons or the windows, type some words, and move the mouse around and so on.
- Not only scripts, there are certain functions that are supported well by the virtual user and these functions can act as an extension to the virtual user scripts. 
- These functions have been given a general name called “tasks”. 
- These tasks consist of a procedure along with a list of parameters and in some cases they may also include an optional return value. 
- The information regarding the environment of the target computer is also collected by the virtual user with help of a statement called the match statement. 
A specific environment element is searched by this match statement with the help of some descriptor traits like the following:
  1. Static text
  2. Edit text
  3. Pictures
  4. Icons
  5. User items and so on.
- There is one more kind of statement that is used and is called the collect statement.
- It is used to collect all elements of a certain type in to the list.
- Afterwards the virtual user interacts with the software system or application environment using certain keywords like:
  1. Select
  2. Drag
  3. Type
  4. Close
  5. Click and so on.
- Common objects of the operating system like windows, buttons, bars, menus and scrolls are accessed by the virtual users. 
- The virtual user software package comes with a log file feature using which one can write out all the information from within a script. 
- This feature also provides the scripter with information regarding the current run time state of the virtual user scripts. 
- These virtual user scripts can also be debugged whenever required by logging with the printh statement. 
Another fact about virtual user is that there exists no type checking which serves as a very good idea to log the parameters that serve as input to every task.




No comments:

Facebook activity