Subscribe by Email


Showing posts with label Automated Software Testing. Show all posts
Showing posts with label Automated Software Testing. Show all posts

Monday, October 22, 2012

What is the built-in recovery system in Silk Test?


With the in – built recovery system of the silk test automation tool it has been made possible to restore the application under test to its stable state which it was in before it crashed, failed or hanged. The stable state to which the recovery system of the silk test restores the application under test or AUT is called the base state of the application software. 

The test automation counterpart of the silk test i.e., the winrunner does not support this feature. The recovery system comes in to action whenever the application under test fails ungracefully. 

For client server based applications there are 4 major tasks that are carried out by the built – in recovery system of the silk test. Those 4 major tasks have been listed below:
  1. Ensuring the continuous running of the web browser.
  2. Restoring the application back to its default size if it has been minimized by the user.
  3. Setting the working status of the application as active.
  4. Closing the other dialog boxes or child windows that have popped up.
On the other hand the below mentioned are the tasks that are carried out by the built – in recovery system of the silk test for the application software that are browser based:
  1. Waiting for the browser to restore itself to the active mode if it has been inactive for a long time.
  2. Ensuring that the various below mentioned elements are displayed:
a)   Status bar
b)   Text field
c)   Location
d)   Browser tool bars and so on.

- The data regarding this built – in recovery system is stored in a file by the name of defaults.inc which can be found in the same directory where the silk test has been installed. 
- Most of the actions that are carried out on the application under test are when the application is in the default base state. 
- In this state, all the actions are based up on the default properties.
- So, whenever a test case or script is executed the recovery system gets invoked automatically.
- However, the flow of control is different when the tests are run based up on some main function or a test plan. 
- Here, when a test case starts executing via the silk organizer the same test case gets the control first. 
- But before the execution of any test case, a function is called namely “default test case enter”. 
- This function is called with the purpose of calling the set app state function which in turn will invoke the default function “default base state”. 
- Following this the execution of the test case begins. 
- In any of the either cases the control is passed to the default test case exit function:
  1. If the test case finishes with its execution or
  2. If the test case encounters an error while execution
- The default test case exit function keeps the record of the logs for the exceptions in the test case execution and later calls the set base state function which in turn calls the default base state function. 
- Whenever the tests are run via a main function instead of one two recovery functions are invoked in the same way. 
- But here the difference is that instead of calling default test case center the function called is “default script enter” before the scripts start running. 
- The value of this function is NULL by default. 
- When the last test case has finished executing the “default script exit” function is called. 
- The purpose of this function is to log the errors or faults that occurred outside the test case. 


Sunday, October 21, 2012

What Silk Test does when you enable a browser extension?


Extensions in silktest prove to be of great help whenever testing has to be carried out in environments that are not directly supported by the silk test. 
If you want to use the silk test for testing in a specific environment then it is necessary to enable those extensions in the silk test. This is a way of telling the silk test to load some specific extensions. 

What are browser extensions?

- The extensions which have to be loaded do not depend on the machine on which the AUT or the application under test is installed on a local machine or on a remote machine. 
- The extensions which have to be used need to be enabled on the host machine. 
- Also, those extensions need to be enabled on the target machines as well on which the application under test is to be tested. 
- Once the extensions have been enabled on all the machines for AUT, a list of extensions to be loaded is sent to each agent by the silk test. 
- Then, the appropriate extensions for the AUT or application under testing are dynamically loaded by the silk test agent component. 
- The extensions that meet all the requirements of the application that you wish to test should only be installed on the target machine for the current as well the future testing sessions. 
- However, there are some extensions that are enabled by default via the installation program of the silk test. 
- The default extensions may include extensions that come with the silk test, java extension as well as all the supported web browser extensions. 
- The other extensions are the one that you explicitly install for the development environment. 
- These are enabled for those applications software that are invoked during the standard run time of the extension. 
- The option for enabling the extensions is available on the basic work flow bar. - An extension is actually a file that is used with the purpose of extending the capabilities of the data that is available to a particular program. 

What SilkTest does when a browser extension is enabled?

Extensions are provided by the silk test for the testing of the applications which make use of the non standard controls in browser environment as well as the other specific developments. 
- First, you need to start or launch the application that you want i.e., the application for which you want to enable the extensions but make sure to do so in the maximized mode of the application window. 
- Now go to the basic work flow bar and click on the enable extensions option. 
- Select the extensions to be installed from the list and un-check the others. 
- After selection click OK and after this you will get an extension settings dialog box. 
- When you get the test extension settings dialog box, close the application under test and re launch the application. 
- Click OK in the test extension settings dialog box. 
- Finally, you need to click on the OK option in the test passed dialog box. 
- You need to do one more thing to ensure that the test case you execute starts as well as ends with the application under test or AUT in a state that is intended in spite of the errors that may occur. 
- The thing is to configure the recovery system of the silk test. 
- The option set recovery system is also available on the basic work flow bar. 
- Select your application and click OK for the dialog box that states that the system has been configured. 
- You are now all set to go for the recording of the test cases. 


Saturday, October 20, 2012

What are the challenges of testing Web Applications? How to use Silk Test with Web Applications?


Web applications are a rage these days and thus a fast delivery of web applications is in urgent need. But at the same time it is important to keep the security of these web applications in check. 
However, web testers continue to face some challenges while testing the web applications and this is what that we are going to discuss in this article. 

What are Web Applications?

- As we are familiar with the growing popularity of the web applications, with the time, new and advance features are being introduced in the web applications.
- It makes them one of the most popular means for the development of the commercial systems. 
- Nowadays, almost all the companies opt for developing web based software wherever and for whatever possible. 
- This is so because with the help of web applications the company can easily cater to the needs of a large number of people. 
- Also, once the infrastructure of the application is put in place the deployment of the apps becomes quite easy. 
- The web applications are powerful assets and using them, a feature rich content can be provided to a large audience across the globe at quite an economical cost.
- Hence, it becomes more and more daunting to test these complex applications. 
- For the web applications the two factors continue to be the most important:
  1. Accessibility and
  2. Security
Challenges in testing Web Application
While on one side, the company wants to cater to the users all over the world, on the other side their web application can fall prey to some grave security issues. Thus, only web application testing stands a chance to secure the data as well the organization. 
- The design and nature of every web application is somewhat unique to it and so it is possible for the users to follow different paths of usage.
- In such cases, it is necessary to ensure that all paths are working well by testing all the permutations and combinations. 
- Also, all the software applications are not self explanatory. 
- Users of a web application are from various back grounds and those who are from a non technical background may find it hard to use the application. 
- This does affects the design of the application and therefore should be tested during the usability testing of the application. 
- For intranet based web applications, it is possible for the developers to make assumptions regarding the audience but this is impossible for the internet based web applications. 
- Today, there are many web browsers available and so different browsers are used by different users. 
- Thus, there is a need to test this aspect since it can be ensured that the web application is compatible with all the platforms.

How is web testing done in SilkTest?

- Web testing is possible using the Borland’s silk test. 
- Till now, it has been proven to be the leading functional testing tool in the software industry when it comes to testing e- business applications either based up on windows, web, java or client or server based and so on. 
- Silk test is used for the following purposes:
  1. Test planning
  2. Test management
  3. Direct data base access and validation
- It also comes with a built – in recovery system for the purpose of unattended testing of the web applications across multiple browsers, platforms and technologies.


Friday, October 5, 2012

Explain the concept of object repository & how QTP recognizes objects?


Just like its Winrunner counterpart, the quick test professional also comes with an object repository which is the first aspect of this article that we are going to discuss in this article and the second aspect to be discussed is regarding the identification of the objects by the quick test professional. 

What is a Object Repository?

- Just like we have a store room and other storage places in our house, the same way the quick test professional consists of a storage place where the information regarding the objects can be stored and this storage place is called the “object repository”. 
- During the process of the identification of the objects, the presence of an interface is necessary between the application under test and test scripts in order for proper identification of the objects. 
- This interface is provided by none other than the object repository itself. 
- An object can be identified as a run time entity with some characteristic properties as well as structure. 
- Few examples of software objects are:
  1. Windows
  2. Web pages
  3. Edit boxes
  4. Buttons
  5. Check boxes and so on.

What kind of objects QTP recognizes?

Quick test professional recognizes 4 types of objects as mentioned below:
1. Run time objects
These are the objects that are present in the application under test or AUT such as links, check boxes, buttons etc.

2. Test objects
-Run time objects cannot be operated up on directly rather there references are created which are nothing but the test objects such as web button, link, win edit and so on. 
-These test objects are referenced by different names in different environments.

3. Utility Objects
- These are the objects that are reserved by the quick test professional for the purpose of testing as well as test reporting. 
- One such example is the reporter object for displaying the test results.

4. User defined objects (also known as the automation objects)
- In most of the cases objects are required that can perform some specific operations i.e., the user defined operations. 
- Such objects are referred to as the user defined objects.

How QTP recognizes objects?

- For every action that is performed on an object, a local repository is created by the quick test professional automatically while the recording is in progress.
- The local object repository is different from the global object repository in the respect that it cannot be shared among the tests.
- Additional objects can be added to this repository by the user as well as the existing ones can be modified. 
- Global object repository is more commonly known as the shared repository. 

Now let us focus up on the second aspect of the quick test professional i.e., the identification of the objects. 

- Quick test professional has got two major mechanisms for accomplishing this task as stated below:

1. Usual object identification mechanism
- In this mechanism, the learned description of the object i.e., the one provided by user is followed throughout the identification process for identifying the object. 

2. The smart identification mechanism
- This mechanism is smarter than the former one, more flexible but far complex. 
- It comes into play when the first one fails. 
- It rejects the description that was used in the first mechanism and prepares a list of objects that resembles properties defined by the quick test professional. - For the smart identification process to work properly it is required that it should be configured properly. 





Thursday, October 4, 2012

Explain the check points in QTP? In how many ways we can add check points to an application using QTP?


Check points in quick test professional have always proved to be an efficient tool. In this article, we discuss exclusively about the check points in quick test professional and the ways in which the check points can be added to an application with the help of quick test professional. 

What is Check Point? How it is added to an application?

- Check point can be thought of as a point to confirm or verify whether the application under test or AUT is working properly or not. 
- This is verified by making comparisons between the current value of some property and the expected value of the same property decided earlier. 
- Whenever a check point is added by the user, an equivalent check point is added by the quick test professional to the present row in the key word view as well as a “check check point” statement is added to the expert view. 
- The name of the test object also serves as a name for the check point that has been added to it. 
- The check points can be added via an active screen by placing the cursor on the desired location and clicking the insert standard check point option. 


Types of Check Points

It is on the basis of this expected value that the check points have been classified in to various types as described below:

1. Page check point: 
- This check point is the check point that is created exclusively for a web page. - This check point keeps a count of all the images and links present on that particular web page. 
- Another purpose for which page check point is used for checking the time taken by the web page to load fully i.e., the load time.

2. Bitmap check point: 
- This check point is the check point that helps in checking of the bitmap of either a full web page or an image. 
- Two images are provided to this check point, one the actual image and the other one expected image. 
- These two images are compared pixel by pixel by the bit map check point.

3. Image check point: 
- This check point is used for keeping a check on certain properties belonging to a web page such as the source file location of the image. 
- However, being a image check point, it cannot check pixels of an image like a bitmap check point does.

4. Text check point: 
- This check point is the check point that is employed in checking the expected text in a web application or web page. 
- This text may belong to a specific region of the text displayed or application under test.

5. Accessibility check point: 
- This check point verifies whether or not the accessibility standard of the application under test matches with the accessibility guidelines laid down by the W3C or world wide web consortium for information systems and technology which are web based.

6. Data base check point: 
- This check point performs the task of generating a query while the recording is in progress. 
- The values stored in the data base serve as expected values. 
- This query is executed during the run time to obtain the actual value which is then compared with the expected value.

7. Table check point: 
This check point is the one that is used for checking various table properties such as cell width, row width and so on.

8. XML check point: 
This check point is the one that is used to verify the following:
a)     XML schema
b)     XML data etc.



Tuesday, September 25, 2012

What is the difference between functions and actions in QTP?


Functions and actions are two different aspects of quick test professional. In this article we will talk regarding the two and see what the differences between them are. 

What are functions in QTP?

- In most of the cases you may need to use some segments of code again and again in your tests. 
- In such a case a user defined function can be created which will not only reduce the length of your tests but will also make it easier to be designed, read and maintained. 
- The created functions can consist of the following:
  1. Sub routines,
  2. Modules
  3. VBScript functions and so on.
- Three simple tests need to be followed if a function is to be used in the test from a library:
  1. For creating a new function you can select new function library from the file menu. This cause a new tab to open up in the quick test professional window. You can even opt for multiple tests in the same file.
  2. Next you need to save the function with extension “.qfl” and associate the appropriate library with that particular function. “Associate function library” option can be accessed from file menu.
  3. Now the third step is to invoke the function using the usual simple function call. Quite advanced or sophisticated functions can be generated using DCOM and COM.

What are actions in QTP?

- Whenever you have a piece of code at your disposal you get two options in quick test professional i.e., to either turn it in to a function or a reusable action.
- When the quick test 9 was introduced by the mercury, an argument was made in the favor of the functions for making them more compelling by the means of multi document interface. 
- Many function libraries can be used at once but still mostly one test is used. 
- If you want a reusable action to be edited, the current test has to be shut down. 
- Then you need to open the test in which you want to make the changes, make the changes and then save and close. 
- Later, the original test can be re-opened.

Differences between Functions and Actions in QTP

Now we are stating below some very basic differences between the functions and actions in quick test professional:

1. Passing of Data: 
Functions can access a variety of objects advance as well as primitive like arrays, test objects (such as frames, pages and so on.) and dictionary objects. But this is not the case with the actions rather they can accept only primitive kind of data types such as parameters like integers, strings and so on.

2. Use of Resources: 
Each action is provided with the following basic things:
a)   A folder
b)   3 separate VBS files
c)   A subfolder for keeping snapshots
d)   A certain amount of load time
e)   An excel spreadsheet and
f)    A local object repository.
On the other hand a function consists of only the code and nothing else.

3. API: 
For functions, the function libraries can be attached to the test scripts through the API of the quick test professional. As for the actions the insertion of the calls in the existing actions is not possible through the API of the quick test professional rather it can be done only through the interface.

4. Return Values: 
Actions return the values which are quite difficult to be read in syntax as well as understand. On the other hand the return values of the functions work well and similarly in all the languages.
With actions your test can be divided in to business processes or logical units along with the scripts that are more efficient as well as modular.


Sunday, September 2, 2012

What are data driven tests and how they are created in WinRunner?


When you go for testing of your software system or application, it serves good if you check the performance of your software system or application with multiple sets of different data for some set of same operations. 
For doing so you can go for creating a data driven test! Let us see in detail what actually the data driven tests are and how you can create one in the winrunner. 

What are Data Driven Tests?

- Data driven tests cuts down on the difficulty of manually executing the same test over and over again. 
- The data driven test is created with a loop that iterates exactly the same number of times as there are sets of data to be implemented. 
- Say the loop executes 20 times, so in all these 20 iterations the loop executes with a different set of data and drives the test with it. 
- Since every time the test is driven by a different set of data, the test has been termed as the data driven test. 
- However, in order to make the winrunner run a data driven wizard, use parametrization which involves the linking of the data to the test script which it is to drive. 
- After parameterization, the data is stored in a table called data table. 
- It is up to you that whether you carry out this whole process on your own manually or you take the assistance of the data driver wizard. 
- Usually a non driven test consists of the following three steps:
  1. Creation of a test
  2. Execution of the test
  3. Analyzation of the test results.
- In data driven testing there are two additional steps are there in addition to the above mentioned 3 steps. 
- These two extra steps lie between the creation of the tests and execution of the tests. 
- These two extra steps are as mentioned below:
  1. Conversion of the test in to a data driven test and
  2. Creation of a corresponding data table.

Stages involved in creation of data driven test

The below stated are all the stages that are involved in the process of data driven test creation:
  1. Creation of a test
  2. Conversion of a data driven test
  3. Preparation of data table
  4. Running the test
  5. Analyzation of the test results.
- You cannot directly convert a test in to a data driven test. 
- For doing so, first it is required that you should create a basic test and then convert it in to a data driven test. 
- This basic test can be created by recording a test with only a single set of data. 
- Now this test is recorded by going to the insert menu, then selecting GUI check point, then “for single property” command.
- This is to ensure that the correct order is open. 
- This order can be later modified and updated. 
- There is an alternative to this, which is that you can create bitmap check points, bitmap synchronization points and data driven GUI check points. 
- Firstly, the values contained in the check point statements and recorded statements with parameters are replaced and a data table is created which stores the values that are to be assigned to the parameters. 
- This is the parameterization process. 
- The functions and statements are added to the test scripts so that they can be read from the data table. 


Saturday, September 1, 2012

What are the types of Exception available in Win Runner? How do you handle an Exception in WinRunner?


In this article, we talk about the various kinds of exceptions available in winrunner and how to handle them. Basically 4 types of exceptions are available in winrunner and they have been mentioned below:
  1. Pop up exceptions
  2. Object exceptions
  3. TSL exceptions and lastly
  4. Web exceptions
Web exceptions are available only if you have installed the web add- ins.

How are different types of exceptions are handled in WinRunner?

- A pop up exception handler is provided in the wirunner package for handling the pop up exceptions that often show up during the execution of the test scripts during the running of acceptance user test.  
- Winrunner can be made to handle pop ups by making it learn the window and by specifying a handler for the exception. 
- These handlers can be:
  1. User defined handlers: The names of these handlers can be specified by clicking on the user defined function name and changing it according to your own will.
  2. Default actions: Winrunner makes its own choice whether to press ok or cancel option. The desired default handler can be selected in the dialog box.
What if your batch test is executing up on a highly unstable version of the software system or application? 
- Obviously it will crash and you would want to recover the test execution. 
- This is possible only through the TSL exceptions which help in the test recovery by instructing the winrunner to exit the current test and restart the application.
- The winrunner can be easily instructed upon how an unexpected event or error can be handled that may occur in the testing environment while you test your web site. 
Here now we explain how to handle such exceptions. 
- Whenever you load some web test add in, the winrunner can be very well instructed up on how a particular exception can be handled that occurred during a test run in your web site. 
- The simplest example that can be given is of the security alert dialog box that some times appears during the test run. 
- The user can resume the normal testing by clicking on the yes button of the security alert dialog box. 
- All the exceptions that are supported by the winrunner are mentioned in a list and can be viewed in the web exception editor.
- This list can be modified and additional exceptions that you want the winrunner to support can be configured and added to the list. 
- All the new exceptions are to be added to the list of exceptions stored in the web exception editor. 
- You need to go down to the tools menu and select the option of web exception handling.
- This opens the web exception editor. 
- There is a pointing hand, clicking on that adds a new exception to the list. 
- For categorizing the exception you need to select a category in the type list. 
- The MSW_class, message and title of the exception are displayed by the editor.
- There is an action list available which provides you the options for carrying out the following execution:
  1. Web_ exception_ handler_ dialog_ click_ default: For activating the default button.
  2. Web_ exception_ handler_ fall_ retry: For reloading the web page as well as activating the default button.
  3. Web_ exception_ enter_ user name_ password: For using the given user id and password.
  4. Web_ exception_ handler_ dialog_ click_ yes: For activating the yes button.
  5. Web_ exception_ handler_ dialog_ click_ no: For activating the no button.
- The other operations that can be carried out in winrunner up on exceptions are defining, modifying, activating and deactivating them. 


Thursday, August 30, 2012

What is a Module? What is a Compiled Module? (In WinRunner)


Modules are the basic elements of any software system or application that make up the foundation of that software system or application. In winrunner usually the term “compiled module” is used. We shall see in this article that what are the compiled modules and how they can be created in winrunner. 

What are Compiled Modules?

- Compiled modules store the frequently used functions and so are considered to be a kind of libraries. 
- In compiled modules, the functions defined by users i.e., the user defined functions can be stored and later these stored user defined functions can be called from the test scripts. 
- Compiled modules are considered to be a library since they are actually a script containing all the user defined functions which are required to be called many times from other tests. 
- Whenever a compiled module is loaded, the functions that it contains are subjected to automatic compilation and reside in the memory itself. 
- After this, they can be called directly and from within any test. 
- With the compiled modules, the performances as well as the organization of the tests that you create are improved significantly.
- This happens so because the compiled modules are debugged before they are used and therefore the tests that we created require very less error- checking. - In addition to all this, the interpretation of a function in a test script is quite slower than the calling of a function that has already been compiled.

There are 2 ways available for compiling a module as mentioned below:
  1. Loading the module to be compiled from a test script with the help of the TSL load function.
  2. Running the script of the module to be compiled with the help of the winrunner run commands.
- The step commands can be used for performing the incremental compilation if in case you need to debug or modify an already existing module. 
- After this, the part of the compiled module that you made changes to needs to be run so that the entire compiled module will be updated. 
- It is necessary that the user defined functions present in your compiled modules are automatically compiled every time the winrunner starts up. 
- For this you need to add load statements top the start up tests. 
- However, you should know that for loading the recovery compiled module there is no need for adding the load statements to the start up tests or any other tests.
- This is so bacuse the recovery compiled module loads by itself when the winrunner is started. 
- Another point to be taken care of is that the compiled modules cannot load the GUI map files when you are working in the GUI map file per test mode.
- If the compiled module has to make references to any of the GUI objects present in the application software then it is required that the referred GUI objects must also be referred in the test which is responsible for loading that particular compiled module. 
- Like a regular TSL test the compiled module can be opened, edited or saved.  - However, there is a big difference in the contents of a compiled module or ordinary tests. 
- Like a regular test, a compiled module does not contain any analog input or check points. 
- This is so because a compiled module is designed to store user defined functions rather than just performing a test. 
- The purpose why it stores all the frequently user defined functions is to speed up the execution process by providing a quick and convenient access from the other tests. 
- Its contents are:
  1. Function definitions and declarations,
  2. External functions prototypes
  3. Load statements etc. 


Facebook activity