Subscribe by Email


Showing posts with label Object. Show all posts
Showing posts with label Object. Show all posts

Friday, June 21, 2013

Explain about the Paged Memory and Segmentation techniques?

Paging and segmentation, both are memory management techniques. 

What is Paging?

- This technique has been designed so that the system can store or retrieve data from the virtual memory or secondary memory of the system to be loaded in the main memory and used. 
- In this scheme, the data from the secondary memory is retrieved by the operating system in blocks of same size commonly known as the paging. 
- This is why the technique has been called the paging memory – management scheme. 
- This memory management scheme has a major advantage over the segmentation scheme. 
- The advantage is that non-contiguous address spaces are allowed. 
- In segmentation, non-contiguous physical address spaces are not allowed. 
Before the paging actually came in to use, the whole program had to be fitted in to the contiguous memory space by the systems. 
- This in turn led to a number of issues related to fragmentation and storage. 
Paging is very important for the implementation of the virtual memory in many of the operating systems that are general purpose. 
- With the help of paging memory management technique, the data that cannot be fitted in to the physical memory i.e., RAM can be easily used. 
- Paging actually comes in to play whenever a program makes an attempt for accessing the pages that have not been presently mapped to the main memory (RAM). 
- Such situation is termed as the page fault. 
- At this point the control is handed over to the operating system for handling the page fault.
- This is done in a way that it is not visible to the interrupt raising program. 

The operating system has to carry out the following instructions:
  1. Determining the location of the requested data from the auxiliary storage.
  2. Obtaining a page frame in the main memory that is empty to be used for storing the requested data.
  3. Loading the data requested in to the empty page obtained above.
  4. Making updates to the page table so that new data is only available.
  5. Returning the control interrupting program and retrying to execute the same instruction that caused the fault.

What is Segmentation?

- This memory management technique involves dividing the main memory in to various sections or segments.
- In the system that makes use of this management technique, a value identifying the segment and its offset is contained in the reference to that memory location. 
- Object files that are produced during the compilation of the programs make use of the segments when they have to be linked together to form an image of the program and this image has to be loaded in to the memory.  
- For different program modules, different segments might be created. 
- Some programs may even share some of the segments.
- In one way, memory protection is implemented by means of memory segmentation only.
- Paging and segmentation can be combined together for memory protection. 
- The size of memory segment is not always fixed and can be as small as a byte. 
- Natural divisions such as the data tables or the individual routines are represented by the segments.
This is to make the segmentation visible to the programmer. 
- With every segment, a set of permissions and length is associated. 
- A segment can be referred to by the process only in a way that is permitted by this set of permissions. 
- If this is not done, a segmentation fault is raised by the operating system. 
Segments also consist of a flag that indicates the presence of the segment in the main memory of the system. 


Sunday, September 30, 2012

What are the Features & Benefits of Quick Test Pro (QTP 8.0)?


The first version of the quick test professional had its launch in the month of November of the year 2002 by its sole creator mercury interactive. Later in the year of 2007, HP (Hewlett Packard) took over mercury interactive and quick test professional became its sole property. 

Features and Benefits of the Quick Test Professional 8.0


a) Quick test professional is a tool that follows the object based approach. This means that the quick test professional operates on the principles of test object model for carrying out various testing operations. Therefore, by using quick test professional the test operations can be automated based on either test objects, automation objects or utility objects.

b)The quick test professional has been solely created for carrying out regression as well as functional testing. However, sometimes it may be employed for performing performance testing and compatibility testing.

c)Like a keyword driven test automation frame work, the quick test professional also follows a key word driven approach.

d)Only windows operating environment is supported by the quick test professional. What the quick test professional is actually dependent on is the user interface for the automation of the test objects rather then depending up on the server side interactions.

e)CUI or command user interface is not supported by the quick test professional but it does support the web based and GUI based application software.

f) No matter in which language you are comfortable, the quick test professional provides a multilingual environment to work in. It supports chinese, japanese, korean etc. depending on the license.

g) For data driven testing the excel like sheet has been adopted by the quick test professional and also it has adapted the VBScript by Microsoft for scripting the test cases.

h)  A lot of tool support is available for quick test professional like:
- An integrated VBScript engine so that file system can be used along with the scripting features.
- An integrated SQL engine for using SQL statements to carry out data base operations in quick test professional.
- Integrated spread sheets to carry out data driven testing.
- XML format is available.
- Integration with other tools like quality center and winrunner is possible.
- User interface test case automation is possible along with some non UI test case automation like data base operations and file system operations.

i) It has been derived from the mother tool of quick test professional i.e., the Astra Quick test.

j) Microsoft internet explorer is very well supported by the quick test professional for the purpose of recording tests.

k) It is desk top application.

l) Quick test professional was developed in cooperation with .NET technology.

m) Quick test professional is a stand alone or a first tier application since resources are stored as external and internal files due to the lack of a data base.

n) Two types of licenses have been granted to quick test professional:
- Float license or concurrent license: this license grants access to only one user at a time.
- Node locked license or seat license: this is used from a fixed machine or system.

o) Quick test professional has got support for Unicode.

p) Though the services of the quick test professional cannot be shared from one machine to another, the sharing of resources is on different machines is possible. 


Saturday, September 29, 2012

What is Reporter.ReportEvent? What is GetRoProperty? (In QTP)


In this article we are going to discuss regarding the two main things namely:
  1. Reporter. Report event and
  2. GetRoproperty
As far as the purpose of the reporter object is concerned it is used for sending or reporting the information to the results of the test. With a reporter object the following tasks can be performed:
  1. For reporting of the status of the results of the tests like success, failure, warning, error and so on.
  2. For enabling or disabling reporting of the steps that immediately follow the executed statement.
  3. For retrieving the folder path where the results of the current tests can be stored.
  4. For retrieving the execution status at the current point of the execution process.
There are many methods and properties that are associated with the reporter object and the reporter. Report event is one of them. 
Those methods and properties are as mentioned below:
  1. Reporter event method
  2. Filter property
  3. Run status property
Here the thing to be discussed is about the first one i.e., the reporter event method in detail. 
- This is the most commonly method that is used with the help of a reporter object. 
- It is certain that even if one has worked on quick test professional for a very short period of time then he/ she might have come across the use of this object. 
The syntax for using this object is as mentioned below:
Reporter. Reportevent event status, report step name, details [, image file path]

The event status can be one of the following:
  1. Mic Pass or 0: If the test step passes the run.
  2. Mic Fail or 1: If the test step fails the run.
  3. Mic done or 2: If the status of the test is not affected by the run of the test step.
  4. Mic warning or 3: If the status of the test is not affected by the run of the test step and a warning has to be issued.
- Next step i.e., the report step name represents the name of the step that is currently being executed. 
- The last aspect i.e., the details represent the details of the step as defined by the user. 
- The reporter. Report event can be used for reporting of the custom steps in the test results of the quick test professional.

- After the tests have been executed, the results can be stored in a text file or in an xls file via VBScript library functions. 
- It can be considered to be a kind of reporting mechanism of the quick test professional. 
- As the name itself specifies it means reporting an event to the test results. 

What is GetRoProperty in QTP?

- The GetRoproperty is used basically for the following two tasks:
  1. For returning the run time value or the current value of the test object property from the objects present in the software system or application.
  2. For retrieving the current property value during the run session of the object present in the software system or application.
- Actually GetRoProperty is one of the 4 methods provided by the quick test professional for working on the test object repositories and the other 3 are:
  1. GetToProperty
  2. SetToProperty
  3. GetToProperties
- Most of the developers often get confused with these methods and do not use the appropriate method for the situation. 
- For employing either of these methods, it is important that you should know and understand the details of the test object properties which can be identified by the quick test professional as a standard set of properties. 


Thursday, September 27, 2012

How would you connect to database using vbscript?


VBScript or visual basic scripting edition is the basic scripting language for the HP test automation suite called the quick test professional. This scripting language is quite a lively script whose interpretation is done via script host of the Microsoft windows. This scripting language comes with a whole lot of excellent and powerful functions with good support for data types, error handling and variables. 

There are two engines that can interpret the VBScript namely:
  1. Wscript.exe and Cscript.exe: it works in the GUI environment f the windows with the help of the WSH or windows script host. However this engine is basically used for automating the administration tasks as well as to automate the systems.
  2. VBScript.dll- this engine can be invoked by asp.dll and basically serves in the web environment.
VBScript is used as the following in quick test professional:
  1. Data base record set object
  2. Data base command object
  3. Data base connection object
Here in this article, it has been discussed about how a connection between data base and quick test professional can be established through the VBScript. 

The below mentioned are the various VBScripts available for connecting and accessing data base in quick test professional:
  1. Updating records in a record set
  2. Deleting a record from the record set
  3. Finding a record in record set
  4. Clearing a data base table
  5. Connecting to an ADO data base
  6. Adding a new record to the data base

How to connect to a database using VBScript?

- To connect to a data base using VBScript, a DSN inventory is required. 
- An ADO connection is another requirement for making an open connection with a specific data source. 
- Once this connection is established, the data base can be easily accessed as well as manipulated. 
- Also, once this connection is established it is not important how many times that data base is accessed. 
- Another way to establish a connection with the data base using VBScript is by passing a connection string through some record set object or a particular command. 
- Though this method is quite quick but it holds good only for the single specific queries. 
- An essential connection from a web server to a data base is nothing but a data source. 
- This connection can either be established via a dedicated machine running SQL server or through a data base file on a web server at some other location. 

Two types of DSNs or data sources are available namely:
  1. File DSN: This is the connection that is created by the script when an access to the data base is required. Here the path and name of the data base to be accessed needs to be specified. Another condition for this DSN to work is that the data base to be connected to must be residing on a server in a directory which must be accessible by the script.
  2. System DSN: Creation of this kind of connection is under the charge of the administrator of the web server which consists of the required data base. This is the most popular data base connection since it is much reliable than its former counterpart.
- After the access to the data base is complete it is important that the connection should be closed at the end of each page. 
- For creating any application, the foremost thing that is required is data base itself. 
- A number of programs are available for developing a data base, however, the Microsoft access remains the most popular of them all. 
- It is important for web application designer to know the basics of the data base usage with VBScript as well as active server pages for developing real web applications.


Friday, September 14, 2012

What is a step generator in QTP?


Step generator as we all know is quite a useful as well as popular feature of the complete test automation suite “quick test professional”. 

What is a Step Generator?

- It generates a library of the functions which also forms a part of the quick test professional suite.
- The step generator serves the purpose of the non recordable as well as record able steps.
- To get to the step generator in quick test professional, just go to the insert menu, then hog down to the step generator option and here you have it. 
- Or, if you do not want to go for this method you can straightaway press the function key F7 which is the short cut key for this whole procedure.
- A range of context sensitive functions are provided by the step generator. 
With the help of these context sensitive functions it becomes very easy for one to add the steps as required. 
- The steps in the step generated can be added with the required values. 
- The steps mentioned below can be defined in the step generator via the step generator dialog box:
  1. Utility object operations
  2. Tests only steps or test object operations
  3. Call to library functions in tests only
  4. Internal script functions
  5. Visual basic script functions and so on.
Some examples of such steps are:
  1. Adding a step that checks regarding the existence of a particular object i.e., whether it exists or not.
  2. Adding a step in which the output or the returned value of a sub routine or method or the result of a conditional statement is stored.
- Any of the values present in the step can be parameterized. 
- Another purpose that is served by the step generator is that using it one can insert steps in tests as well as in functions also. 
- But it has got a limited use when it comes to the library functions. 
- Step generator cannot be used to get access to collections or test object names or a list of the library functions either. 
- Before the step generator is opened up for defining a new step, the place or the point where that particular step is to be inserted is selected and then the step is defined.

What happens when you open the step generator dialog box?

- When you open up the step generator dialog box, the first thing that you need to do is to select the category of the step operation out of the categories mentioned above.
- Then, you should select the function library or the object that is required. 
- The step after this involves the selection of the appropriate operation like either method or property or function. 
- The final step involves the defining of the return values as well as the arguments or the parameters as and when required. 
- After the completion of all these steps, the step is inserted by the generator in to the required test with the corrected syntax. 
- Later, one can add many more steps at the same location itself without shutting down the step generator. 
- Later whenever needed the step generator can be accessed from either of the following:
  1. Expert view or
  2. Key board view or
  3. Active screen.

For what purpose step generator is used?

- Step generator is mostly used for breaking down the tests to obtain better testing results. 
- It will not be wrong to consider this as a debugging process i.e., debugging by giving breaks. 
- Since particular steps can be generated in between the actions, a lot of time is saved. 
- Also, if while recording the tester misses out one step it can be easily inserted afterwards using step generator. 


Sunday, August 19, 2012

How do you program tests with Test Script language (TSL)?


The tests that are created by the winrunner are composed of the statements that have been coded in a special language by the mercury interactive called Test Script Language or TSL in short form. 
- The tests created can be further enhanced by using the TSL language.
- Remember, this feature which allows the modification of the test scripts via the TSL language is not available in the winrunner runtime.
- The generation of TSL statement takes place whenever a test is recorded by the winrunner. 
- Each line of the test generated by the winrunner is called a TSL statement and is as usual followed by a semi colon like in many other programming languages.
- Each and every TSL statement consists of some user input like mouse click or input from key board to be fed to the software system or application that is to be tested. 
- The length of the TSL statement varies from line to line of the test script. 
- TSL can be thought of more like the C programming language that has been designed for the creation of the test scripts. 
Some certain specific functions like those mentioned below are combined by the TSL:
  1. Variables
  2. Control flow statements
  3. User defined functions
  4. Arrays and so on.
- A recorded script can be further enhanced just by typing the programming elements in to the winrunner test window.
- However, the TSL proves to be quite useful when compared to C because in test script language there is no need of compilation of the written code. 
- The test is just written or recorded and immediately subjected to execution. 
Four types of functions constitute the TSL:
  1. Analog functions
  2. Context sensitive functions
  3. Customization functions and
  4. Standard functions.

How TSL can aid in the creation of tests?

 
- The tests developed using TSL are basically of descriptive nature and thus this type of programming is called the descriptive programming. 
- A logical name is assigned to an object the very moment it is added to the GUI map. 
- Once a GUI object makes its place in the GUI map, it becomes quite easy for you to add any TSL statements to it. 
- The logical name that is given to the object is as such that it gives a description of the GUI object. 
- During the execution of the tests, the objects are discovered based on their logical names itself but for the identification other property values that are stored in the map are used. 
- These logical names of the GUI objects can be further modified so that it becomes quite easy for you for the identification of the tests. 
- While programming with TSL, the statements that perform functions on objects can also be added without making a reference to the GUI map. 
- But doing that requires entering some more information regarding the description of the object so that it can be uniquely identified during the test run. 
- This is the essence of the descriptive programming using TSL. 
- While doing the programming, if you forget which values and properties of the object were to be identified you can take help of the GUI spy for viewing the current properties of the object as well as its values. 
- Stress conditions can also be created while programming with TSL which are designed for the determination of the limitation of the software system or application. 
- Stress conditions can be created by creating a loop that executes a block of TSL statements for number of times specified by the user.  


Sunday, August 12, 2012

What's the use of GUI Map Editor? How do you load GUI Map Editor?


First of all, for the identification of any object, all the information related to it is learnt by the winrunner software and stored in a map called GUI map. 

GUI Map

- The GUI map is an extremely important asset to the winrunner for the identification of the objects. 
- During the running of the tests the location and identification of the objects is done via this GUI map only. 
- The GUI is constituted of the descriptions of the objects that are to be identified. 
- These descriptions of the objects are read by the winrunner and the objects corresponding to the same description are matched up.
- You can even have a comprehensive view of the objects that constitute your software system or application.
- The final GUI map is actually composed of many more small GUI map files. 

In this article we are going to learn about the use of the GUI map 
editor and how it can be loaded.

GUI Map Editor

- The contents of a GUI map can be easily viewed with the help of GUI map editor. 
- You can view either the contents of the whole GUI map or the contents of those small individual GUI map files. 
- The grouping the GUI objects takes place according to the window in which they reside in the software system or application. 
- With the help of GUI map editor you can edit your GUI map at any time manually.

How do you load GUI Map Editor?

- For loading the GUI map editor you just need to go to the tools menu and select GUI map editor option. 
- The GUI map editor offers you two types of views both of which enable you to glance the contents of the either of those mentioned below:
  1. The individual GUI map files or
  2. The entire GUI map
- You can even load the two GUI map files simultaneously in GUI map editor.
- For viewing the contents of two individual GUI map files simultaneously, you just need to expand the GUI map editor. 
- With such a feature you are able to easily move or copy the descriptions of the objects between the files. 
- The window objects column in the GUI map editor displays all the windows and objects that are present in that particular GUI map. 
- The objects which appear in the windows are indented. 
- The GUI map editor also comes with the option of viewing the physical description of the object or window that has been selected by the user. 
- For viewing the contents of the individual GUI map files you need to go to the view menu and select the option “GUI files”. 
- The GUI file drop box lists all the GUI map files that are open at that time.
- In the GUI map editor, the display of the objects is of tree type under the icon and name of the window in which they reside or appear. 
- Double clicking the window icon gives you the view of the objects appearing in it.
- For a concurrent view of all the objects in the tree, the objects tree can be expanded by choosing the “expand objects tree” option from the view menu.
For again going back to the windows only view, you can select the “collapse objects tree” option from the view menu.
- The display of the physical description of the contents of a single GUI map file is automatic but to view the physical description for the entire GUI map you need to select the show physical description check box. 
- However, you should be careful with the point that if the logical name of an object has been modified in the GUI map, then it has been modified in the test script as well so that there is no problem for the winrunner to locate that object.  


Saturday, August 11, 2012

How do you check GUI objects? How do you check a bitmap? (In Winrunner)


In this article we discuss about how one can check the GUI objects and also how to check a bitmap. 


How to check GUI objects and Bitmap

- Checking of the GUI objects is possible by the addition of the GUI check points in the test scripts.
- Once these GUI check points have been introduced in to the test scripts, the behavior of the gui objects can be compared in different versions of the same software system or application and defects in them can also be detected. 
- For checking the GUI objects you just need to point the GUI objects that you want to examine and choose those properties which you want to be tested. 
With Winrunner, you also have the option of checking the default properties as recommended by the winrunner itself or you can even go for the specific properties that you want to check. 
- Information regarding all the GUI objects and their corresponding properties is saved in the form of a check list. 
- The current property values are then captured by the winrunner for the GUI objects and are saved as the expected results. 
- While checking of the GUI objects, an automatic insertion of a GUI check point takes place. 
- The inserted check point appears as either of the following:
  1. Win_check_gui statement or
  2. Obj_check_gui statement
- A GUI check point consists of two parts one of which contains the check list listing all the objects and properties that are to be checked and the second part consists of the expected results which contains the captured property values.
- When a test is executed, the comparison of the current state of the GUI object with the expected results takes place in the software system or application that is being tested. 
- If in case, there is no matching between the current values and the expected results than that particular check point is said to have failed. 
- A GUI check point can be made a part of a loop also. 
- If you run a GUI check point in a loop then the results obtained are displayed as separate entries for every iteration of the loop. 
- All these results can be viewed in the test results window. 
- In some cases, it may also happen that the few of the GUI objects might not be there in the GUI map. 
- There is no need to worry since those GUI objects are added to a GUI map file that is temporary. 
- A GUI check point can be created either by using a regular expression on an edit object or by using a static text object having a varying name. 
- A built in support in winrunner is provided for the following:
  1. Active X control
  2. Visual basic
  3. Power builder application development environments and so on.
- Whenever the appropriate add in support is loaded, the controls are recognized by the winrunner and are treated as standard GUI objects. 
- The GUI check points can be created for these GUI objects in a similar way the check points are created for the standard GUI objects. 
- GUI check points that could check the properties and contents of a table can also be created. 
However one should be careful about the point that the winrunner does not supports the GUI check points that were created in Xrunner. - Winrunner can be instructed to capture a bitmap of the window whenever some check point fails.
- These captured bitmaps are saved along with the test results in the test results folder whenever a test is run. 
- You can create check points either for testing single property of many objects or just for testing a single object. 


Thursday, August 9, 2012

What are the two GUI Map modes available in WinRunner?


When the winrunner executes a test it actually simulates a real world human user by the means of carrying out user like interactions such as clicking GUI objects, moving cursor over the application and entering some input from the keyboard. 
- In order to work with an application, the winrunner needs to learn the graphical user interface of the application just as a human user would do. 
- This learning of the GUI is achieved by the winrunner by learning the GUI objects present in the application along with their properties. 
- The descriptions thus learnt are stored in the GUI map.

But before your winrunner starts learning about the GUI of your software system or application you must decide in what way you need to organize all your GUI map files. 

Winrunner offers two modes for organizing your GUI map files namely:
  1. GUI map file per test mode
  2. Global GUI map file mode
In this article we take up the talk regarding the gui map file per test mode and global gui map file mode in detail one by one. 

About Global GUI Map File Mode

- This is the default mode in winrunner. 
- This mode is quite advance from the second mode i.e., the GUI map file per test mode so it is recommended that this mode should be used by the much experienced testers. 
- Further, you must take care that you use this mode only when the tests have been created with winrunner versions 6.02 and earlier. 
- Organizing the tests in to groups while designing the test suites is perhaps the most efficient way of working with the winrunner. 
- Same GUI objects in the application should be tested by each test in the group. 
- The information regarding the GUI objects referred by those tests is stored in a common repository. 
- Whenever you have a change to be made in the object you just have to give an update of this in the GUI map as well as in the test scripts instead of making changes to each and every test. 
- It may happen in some cases that even after your winrunner has learned all about the GUI of your software system or application it may not show all the objects in its comprehensive list. 
- Therefore, it is important that the winrunner learns every about the GUI of your software system or application in a comprehensive way.

About GUI Map File per Test Mode

- This mode is especially for the ones who are new at using the winrunner since it is quite easy to be used as you do not need to know how actually the GUI map files are created, saved or loaded. 
- However, care should be taken that the tests created on winrunner versions 7.0 and above as they can only be handled using this mode.
- The plus point of this mode is that your time is saved since you don’t have to teach the winrunner regarding the GUI of your software system or application. 
In this mode, every time you create a new test, the winrunner creates a new GUI map file.
- Similarly, whenever you save a test, the winrunner saves the test scripts.
- Whenever you open a test, the winrunner opens up the corresponding GUI map file. 
However there are some minus points also! 
- There are some features that do not work under this GUI map file per test mode.
  1. The rapid test script wizard.
  2. Option for reloading the temporary GUI map file.
  3. Mytntt startup becomes unable to load the GUI map files.
  4. Compiled modules become unable to load the GUI map files.


Facebook activity