Subscribe by Email


Tuesday, August 28, 2012

What are all the default codes WinRunner generates when you start an application?


Automation might be quite a headache but it helps in decreasing the execution time by a great margin and in a way it saves a large number of precious man hours. Once you are done with the default installation of the winrunner you will observe that a winrunner directory has been created under programs. 
This folder consists of the following:
  1. Winrunner executable
  2. Uninstall winrunner
  3. Soft key configuration
  4. Read me
  5. Fonts expert
  6. Sample application folder and
  7. Documentation folder etc.
The purpose of the winrunner is that it has been designed for performing functional testing and regression testing. Take a moment to study some sample application saved in the folder “sample application”. Now let us take a look at the winrunner application! 
- A tool bar is there which contains options such as new, open, save and list box for run modes namely:
  1. Verify
  2. Debug and
  3. Update
- Plus a red button for recording purpose, green arrow for running the test scripts from line 1 and a purple line pointer for running scripts from the current line. 
- Apart from this there are start, stop and pause buttons. 
- Rest of the options on this tool bar are for debugging purpose.  

Now let us begin with the recording of a simple script! 
- You open the application software and winrunner as well. 
- Re-size both the windows such that both of them are visible to you and they do not overlap. 
- Start recording by clicking on the record button and perform some specific operations (like entering some user id and password of the start up page is login page) on the start up screen of the application. 
- After performing some 3-4 operations click on the stop button of the winrunner application and the recording will be stopped. 
- After this, the scripts can be played back and if you might have observed there is a code that the winrunner might have developed for you. 
- Now, after saving the script take a look at the code which some what looks like this:
        #startup window
        Set_window(“login”,3);
        Edit_set(“user id”,”active);
        Password_edit_set(“password”,”*****”);
        Button_press(“sign in”);
        And the code continues.

- Like the above code, the default codes are generated by the winrunner up on the start up of an application software.
- The symbol “#” marks the comments in winrunner. 
- The code may or may not contain a couple of comments. 
- The comments are inserted by the winrunner during the recording phase itself. 
- The second arguments or the numbers in the code represent the time lag between any two statements while the scripts are being recorded.
- Whenever a script is saved through winrunner, a folder by either a default name or name given by the user as the case may be is created which consists of a file by the name “script”. 
- This file consists of the default generated code in plain ASCII codes. 
- This code can be run in two modes namely the verify mode and the debug mode. 
- After this phase, comes the development mode in which the debug mode is used. 
- Finally, the verify mode is used. 
- The set_window() statement in the code lays down the focus on the window. - This helps in performing a particular function on a specific window. 
- When you type in the user id, it is identified by the winrunner and the edit_set statement is generated accordingly. 
- The next statement i.e., the  password_edit_set statement is similar to the edit_set statement, the only difference being that this field contains encrypted data and for security reasons is to be displayed as a series of asterisk “*” marks. 


No comments:

Facebook activity