Subscribe by Email


Showing posts with label Parametrize. Show all posts
Showing posts with label Parametrize. Show all posts

Saturday, August 25, 2012

Explain data parameterization in WinRunner?


Whenever you subject your software system or application to testing, it is obvious for you to think of checking how your software system or application performs with some other multiple sets of data. 
For this what do you do? 
You create some data driven tests with some loops that runs a certain number of times or we can say which runs for how many different sets of data you want the application to be tested with. Each time the iteration of loop takes place, it leads to the testing of the software system or application with a different set of data.
But the winrunner will not simply execute such loops! 
- To make the winrunner use that data for driving the tests it is necessary that you link the data with the particular test script which you want it to drive. 
- This process of linking the data with the test script that it’s going to drive is called parameterizing of the tests.
- The data sets are recorded in the form of a data table. 
- The process of parameterizing the tests can be either carried out manually or you can take the aid of the data driver wizard. 
- The data driver wizard will not only help you in parameterization of your tests but will also help you in storing the data in the data table.
- The conversion of a test in to a data driven test is composed of four major steps and out of which the first important step is the parameterization of the test itself. 
- The process involves the replacement of the fixed values in the following statements:
  1. check point statements
  2. in recorded statements with parameters
- In the next step in this process you have to deal with the setting up of a data table which is suppose to store the values that are to be fed as the arguments to the test. 
- This marks the completion of the parameterization process. 
- Later, the statements and functions are added to the test so that they can be read from the data table and can execute in a loop during each iteration of the loop. 
- Statements are added to that script which is responsible for the opening and closing of the data table. 
- This whole process becomes less head ache when carried out with the help of the data driver wizard. 
- With its aid you can either convert just a part of your script or whole of your script in to a data driven test. 
- In some cases, it happens that even though your test scripts consists of check points, recorded operations, statements etc there is no need to parameterize them, you just want to parameterize the rest of the part of the test script that will be run with multiple sets of data in a loop. 
- In data driver wizard the fixed values in recorded statements and selected check points are replaced by the function “ddt_val”. 
- This function also adds the columns containing variable values to be assigned as parameters. 
- A test script may consist of several statements containing the fixed values entered by the user. 
- There is a dialog box named as “parameterize data dialog box” that can be used for the effective and quick parameterization of the statements and replacement of the data with parameters. 
- For doing this, you need to select the particular instance which consists of the data that is to be parameterized. 
- Then, go for the parameterize data option in table menu and the box opens.
- Select the data table and enter the name for the table. 
- Then hit the “add the data to the table box” option. 
- Later, the data in this table can be modified. 


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.




Facebook activity