Subscribe by Email


Showing posts with label Class. Show all posts
Showing posts with label Class. Show all posts

Saturday, September 8, 2012

How does QTP identifies objects?


Just like winrunner the process for identification of objects is same for quick test professional. In Winrunner, it is required that the winrunner learns about all the objects before it begins identifying them. After learning about the entire GUI objects present in the software system or application the quick test professional begins its search regarding the object or objects that seem to be matching with the properties as stated by the user in the description of the objects.
In many of the cases the description of the objects proves to be quite a useful and simplest method for the identification of the GUI objects residing in the software system or application. This mechanism of quick test professional of searching the objects is bound to work until and unless the properties of the GUI objects are changed. In some cases it happens that the quick test professional encounters two situations;
  1. It does not proves successful in the identification of the object that is suppose to match with the description given by the user or
  2. It finds more than two objects having the same description as stated by the user.
In the above two situations the quick test professional adopts another mechanism and rejects the usual way of object identification. This new mechanism is quite advance then the usual one and is thus known as the smart identification mechanism.

Smart Identification Mechanism for objects in QTP

- This smart identification mechanism being smarter than the normal mechanism is also more complex than that. 
- Even though it is more complex it is more flexible also.
- If the smart identification mechanism is configured according to proper logic then there are possibilities that the quick test professional may be able to identify the GUI objects even if the description provided by the user fails. 
- There are 2 basic properties that are unique to the smart identification mechanism of the quick test professional:
  1. Basic filter properties: These properties represent the basic fundamental properties of the test object class. The values represented by these properties cannot be changed or replaced without making proper changes to the original object values.
  2. Optional filter properties: These are the properties apart from the basic filter properties which also help in the identification of the GUI objects belonging to a particular test class. Unlike the basic filter properties, the optional filter properties do not change on a regular basis. Still these properties can be ignored if they no longer hold to be applicable.

When is Smart Identification Mechanism Activated by QTP?

The smart identification mechanism is activated by the quick test professional only when its unable to identify some object and the whole process is carried out through the following steps:
  1. The quick test professional erases the learnt description of that particular object from its memory and creates a new list of the object candidates that fall under that particular parent object. The objects mentioned in this candidate list are the ones whose properties have a match with the properties in the list of the base filter properties.
  2. The object in the candidates list is matched one by one with the properties listed in the base filter property list and if the no match is found that particular object candidate is simply rejected. The leftover object candidates in the list constitute a new candidate list.
  3. When the list gets empty for one property, the previous candidate list is again adopted by the quick test professional and is considered for matching with the second property.
  4. If only one object remains in the candidate list then this object is considered to be the required one. 


Monday, August 20, 2012

What is meant by Function Generator in WinRunner?


With the aid of visual programming it has been possible to add the TSL statements to the test scripts. Whenever a test is recorded, TSL statements in the test script are generated by the winrunner whenever a user interaction takes place like some input is supplied from the key board or a GUI object is clicked. 
Apart from the record-able functions, TSL comes with many other powerful functions that add considerable flexibility to your test scripts. These functions can be added to the test scripts with the help of the function generator which is the winrunner’s only visual programming tool. 

The function generator is actually an error free and a quick way to obtain good program scripts. 

Tasks carried out by Function Generator

With the help of the function generator the following tasks can be carried out:
1. It helps you in adding the context sensitive functions which help in obtaining information from the software system or application that is being tested and performing operations on the GUI objects.

2. With the help of function generator you can even add some analog as well as standard functions for performing the tasks that are non context sensitive like for example, appending some user defined messages to the test report or doing synchronization of the test execution.

3. Customization functions can be added that help in the modification of the winrunner in accordance with the testing environment. 

Functions are added by the function generator in form of TSL statements. These TSL statements are added in either of the two following ways:

1. By choosing a function from the list: This is the default way of adding functions. A default function is suggested by the winrunner for the GUI object that has been pointed to. Usually the added function is the one that retrieves information or is a get function.

2. By pointing to a GUI object: This is the advance method and should be used by experts as recommended. First, the insert function command is chosen by the user and a GUI object is pointed. Instantly an appropriate context sensitive function is suggested by the winrunner and values are also assigned to its arguments by the winrunner itself. The function suggested by the winrunner can either be modified along with its arguments or a different function can be chosen to replace it. 

More about Function Generator...

- Once the TSL statements to be added have been generated, they can be either pasted in to the test script or can be executed using the function generator. 
- Function generator can be customized in order to make an account for the user defined functions that are quite frequently used in the test scripts. 
- Function generator can be further enhanced by adding to it many other new functions, categories as well as sub categories. 
- For every new category that is added, a default function can be set and also an already existing default function can be changed. 
- Before generating a function for a GUI object, it is thoroughly examined by the winrunner. 
- After determining its class, an appropriate function for that particular object is suggested by the winrunner. 
- This suggested default function can either be accepted or rejected and if rejected a new one can be picked up from the list. 
- For selecting a non default function for the GUI object you need to go to the insert menu, selection function option, then select the option “for object/ window” or you can simply click the insert function for object/ window button present on the user tool bar. 
- Point to the GUI object you wish to be affected and left click. 
- A function generator dialogue box appears, click change option in it.  



Monday, June 25, 2012

How is optimization of installation testing done?


It becomes very important to carry out installation testing towards the end of the release process. It is very important to subject a software system or application to installation testing so that it can be released without any hesitation to the customers. 
One can make sure without installation testing that the software system or application will successfully install on the user’s system in the first go itself! The user might need to install the software system or application again and again which in turn might frustrate the user. You will loose customers as a consequence of this. Therefore perform installation testing becomes absolutely necessary. 
In this article we have discussed about the need for optimizing the installation testing and how to optimize it. by the optimization of the installation testing we mean modifying it further so that  some aspects of it use less resources and work more efficiently. 

What is the need to optimize?


- When you optimize a testing process you can run it more quite rapidly and that too it uses very less memory then. 
- The optimization though has been named as “optimization”, it can never produce a truly optimal system. 
- The amount of time taken by a test case of the installation can be reduced by making it consume more memory.
- In cases where the memory is limited, slower algorithms can be used.
- While optimizing the installation testing one should keep in mind that there is no such design that fits all the test cases. 

On what levels installation testing is optimized?


The installation testing process much like the other processes is optimized through the following number of levels:

Design Level: 
- This is the highest level of the above mentioned process. 
- Design is the best aspect that can be optimized to utilize the resources in a much better way.
- The implementation of the optimized design can be made more efficient by using efficient algorithms which in turn have been benefited from code of good quality. 
- It is obvious for the architecture of the test design to have an overwhelming affect on its performance.
- In some cases optimization process may also involve the following:
(a)  More elaborate algorithms
(b)  Special tricks
(c)   Special cases
(d)  Complex trade offs
- A fully optimized installation testing process becomes difficult to comprehend and may also house more errors than the un- optimized processes.

Source code Level: 
- This step involves rooting out the bad quality code from the test cases and therefore it also improves performance.
- When the malfunctioning code is removed, the obvious slow downs are avoided. 
- However, it is possible that any further optimization made to that test case may decrease its maintainability. 
- But, today there are available what are called “optimizing compilers”.

Compile Level:
- At this stage, it is ensured by the optimizing compiler that the test case is optimized to such a level at which the test case can be compiled by the compiler.

Assembly Level:
- This is the lowest level of optimization process and involves taking advantage of the full repertoire of system instructions. 
- This is the reason why most of the operating systems use the embedded systems are written in assembly code.
- Many of the test cases are compiled from a high level language to assembly language and from there it is manually optimized.

Run time: 
- Run time optimization is needed and are performed by the assembler programmers and just in time compilers which exceed the capability of static compilers.

Two types of optimizations can be performed on the installation testing process namely:
  1. Platform dependent optimization (uses specific properties of one platform) and
  2. Platform independent optimization (effective on all platforms)


What are limitations and advantages of installation testing?


Imagine you have developed your software system or application properly and very carefully and it addresses all the requirements of your client. But what if your client tries to install your software product and it fails terribly? 
It means the installer of your software system or application was developed properly and was not tested also. Now imaging what effect will it have on your reputation in the eyes of your client? You will loose his confidence! Won’t you? 
The only way to escape such a horrible situation is that you carry out installation testing on the installer of your software product and see that it works with all the systems and with different configurations. Therefore the installation testing becomes very important since installation is the first thing with which the user interacts in a software application.

Limitations of Installation Testing


- The biggest limitation of the installation is the time factor since installation testing consumes a lot of time.
- To overcome this limitation one needs to automate the whole installation testing process.  
- Even a single test case of the installation testing takes at the minimum up to 2 hours.
Now you can imagine how much time it will take if you will have to test the installer of a big software system or application. 
- However, the time consumed for each test case also depends on whether the application is subjected to one of the following options:
  1. Upgrading of installation and un- installation process.
  2. Partial installation and un- installation process.
  3. Full installation and un- installation process.
- The installation testing requires that both the software testing engineer and the configuration manager work in collaboration with each other.
- During installation, the software system or application is placed in to a pre- production environment or testing environment which may corrupt the code in some of the cases.
- From the testing environment there are 2 certainties as mentioned below:
  1. The code may progress in to production process or
  2. The code may not progress in to the production process.
- Since the code may get corrupted from other past as well as future releases, all these process need to be performed outside the software development environment which further aggravates the difficulty of the installation testing.
- There is just one simple approach to installation testing which involves running the install program commonly known as “package software”. 
- This package software makes use of a set up program which in some cases act as a multi- configuration wrapper and in other cases it does not! 
- Therefore, in the cases in which the set up program does not act as multi configuration wrapper, the software simultaneously cannot be installed on a variety of systems and configurations which again presents a headache. 
- Furthermore installation testing is limited to certain aspects regarding installation:
  1. Dependency of the software to be installed on other software and patches.
  2. Over installing of a new version over the older one.

Advantages of Installation Testing


- As for the advantages of the installation testing are concerned, the importance of the installation testing is the biggest advantage.
- Installation process is the first thing with which the user interacts and therefore it needs to be proper and efficient. 
- The installation testing keeps a check on this aspect whether it can be installed on a number of different systems and in different environments.


Facebook activity