Tuesday, 20 March 2012

Working With Multiple Browsers in QTP

We are aware of that multiple instances of QTP can't be running on a single machine. But by using QTP we can work with multiple instances of the Application Under Test. For example, QTP can handle multiple browsers or multiple applications at a time.


We can work with 2 applications at a time even without stopping the recording. We should make sure that we configured both Record and Run on any opened applications(Both Windows and Web) under Automation>Record And Run Settings> Select the radio button "Record and Run on any application for both Windows and Web".


We have to keep it in our mind that we can't run multiple instances of QTP on a single machine.But we can handle multiple browsers or applications by using single QTP instance.

Step Generator In QTP

Step Generator is a feature and Library of functions which is used for generating the Recordable or Non-Recordable steps.


We can launch the step generator by anyone of the following methods.

Method#01:
By navigating to Insert Menu > Step Generator.
Method#02:
By pressing F7 short cut key.


The Step Generator enables us to add steps by selecting a wide range context sensitive options and to enter the required values.We can define the steps than can use:
  • Test object operations(Tests only)
  • Utility Object operations
  • Calls to Library functions
  • Calls to VBScript functions
  • Calls to Internal functions
For example, we can create a step to check whether a particular object exists as well as returned value of a function as output value or as part of the conditional statement.


We can parameterize any of the values in out step.Also, we can use the Step Generator to insert steps in function libraries. However we can't use the Step Generator to access the objects names or collections or the list of libraries.


We need to know that where the step needs to be inserted in out script before adding the step.Once the Step Generator is opened we need to select the category for step operation(Test/Utility object, Function) and the required object or the function library. Then we can select the appropriate operation(method, property or function), define arguments and return values.We can parameterizing required by the functions.


The Step Generator is used to insert the correct steps at our test. We can also insert another steps without closing the Step Generator.We can use the Step Generator in Keyword/Expert View or from Active Screen.

Measuring Transaction Time In QTP

In some situations we may need to track the time taken for the script execution or need to track the time taken for a functionality to completed. For example, we can take a Networking application. Assume that we are running the discovery service to identify the list of devices available on the selected network. Here we need to measure the time taken to discover all the devices.

QTP provides a Utility object called "Services" which is used to measure the transaction time. Assume that we are going to track the Discovery service of a networking application.

'* Starting transaction Time
Services.StartTransaction "DiscoveryService"
'* Logic for Discovery Service goes here
'* Tracking End time
Services.EndTransaction "DiscoveryService" 

We can find StartTransaction and EndTransaction under Insert menu. We can also have n-number of transaction points in the same script. But we need to make sure that the tracking is happening properly,

We can also measure the time by using Timer function.Timer is VBScript in built function. We can take the same discovery service for example.

'* Starting transaction Time 
starttime= Timer '* It returns the time elapsed since 12 A.M mid night in seconds
'* Logic for Discovery Service goes here 
'* End transaction Time 
endtime = Timer
'* Calculating final time
finalfime = endtime- startrime

Here starttime,endtime,endtime are variables. We can use any variable based on the wish.

Monday, 9 January 2012

Advantages and Disadvantages Of Automation Testing

This article start with brief Introduction to Automated Testing, Different methods in Automated Testing, Benefits of Automated Testing and the guidelines that Automated testers must follow to get the benefits of automation.

Advantages of Automated Testing
"Automated Testing" is automating the manual testing process currently in use. This requires that a formalized "manual testing process", currently exists in the company or organization. 
Automation is the use of strategies, tools and artifacts that augment or reduce the need of manual or human involvement or interaction in unskilled, repetitive or redundant tasks.
Minimally, such a process includes:
·         Detailed test cases, including predictable "expected results", which have been developed from Business Functional Specifications and Design documentation
·         A standalone Test Environment, including a Test Database that is restorable to a known constant, such that the test cases are able to be repeated each time there are modifications made to the application.
The following types of testing can be automated
·         Functional - testing that operations perform as expected.
·         Regression - testing that the behavior of the system has not changed.
·         Exception or Negative - forcing error conditions in the system.
·         Stress - determining the absolute capacities of the application and operational infrastructure.
·         Performance - providing assurance that the performance of the system will be adequate for both batch runs and online transactions in relation to business projections and requirements.
·         Load - determining the points at which the capacity and performance of the system become degraded to the situation that hardware or software upgrades would be required.

Benefits of Automated Testing
Reliable: Tests perform precisely the same operations each time they are run, thereby eliminating human error
Repeatable: You can test how the software reacts under repeated execution of the same operations. 
Programmable: You can program sophisticated tests that bring out hidden information from the application.
Comprehensive: You can build a suite of tests that covers every feature in your application.
Reusable: You can reuse tests on different versions of an application, even if the user interface changes.
Better Quality Software: Because you can run more tests in less time with fewer resources
Fast: Automated Tools run tests significantly faster than human users.
Cost Reduction: As the number of resources for regression test are reduced.

Choosing the right tools for the job and targeting the right areas of the organization to deploy them can only realize these benefits. The right areas where the automation fit must be chosen.

The following areas must be automated first
1. Highly redundant tasks or scenarios
2. Repetitive tasks that are boring or tend to cause human error
3. Well-developed and well-understood use cases or scenarios first
4. Relatively stable areas of the application over volatile ones must be automated.

Automated testers must follow the following guidelines to get the benefits of automation:

Concise: As simple as possible and no simpler.
  Self-Checking: Test reports its own results; needs no human interpretation.
  Repeatable: Test can be run many times in a row without human intervention.
  Robust: Test produces same result now and forever. Tests are not affected by changes in the external environment.
  Sufficient: Tests verify all the requirements of the software being tested.
  Necessary: Everything in each test contributes to the specification of desired behavior.
  Clear: Every statement is easy to understand.
 Efficient: Tests run in a reasonable amount of time.
 Specific: Each test failure points to a specific piece of broken functionality; unit test failures provide "defect triangulation".
  Independent: Each test can be run by itself or in a suite with an arbitrary set of other tests in any order.
 Maintainable: Tests should be easy to understand and modify and extend.
  Traceable: To and from the code it tests and to and from the requirements.

Disadvantages of Automation Testing
Though the automation testing has many advantages, it has its own disadvantages too. Some of the disadvantages are:
 • Proficiency is required to write the automation test scripts.
• Debugging the test script is major issue. If any error is present in the test script, sometimes it may lead to deadly consequences.
• Test maintenance is costly in case of playback methods. Even though a minor change occurs in the GUI, the test script has to be rerecorded or replaced by a new test script.
• Maintenance of test data files is difficult, if the test script tests more screens. 
 
Some of the above disadvantages often cause damage to the benefit gained from the automated scripts. Though the automation testing has pros and corns, it is adapted widely all over the world.

Thursday, 5 January 2012

Waterfall Model

Waterfall model is the first process model to be introduced and widely followed in Software Engineering to ensure the success of the project. In this model, the software development is divided into phases. As the name suggests each phase is frozen before starting the next phase.

We have the following phases in Waterfall model.

Requirement Specification: The requirements of the system to be developed are captured in this phase. Requirements are nothing but the functionalities and constraints expected from the system to be developed. Requirements are gathered from the customer by consultation or some documents. Then the organization will analyze the validity and the possibility of the incorporation of the requirements with the system to be developed. Based on the analysis the “Requirement Specification” document will be prepared. The specification document will serve as a baseline to the next phase.

Design: This phase will take the Requirement Specification as input. Before starting the coding, it is very important to understand what we are going to create and what it should look like. The requirement specification will be studied and the system is designed based on the requirement document. Once the system is designed, the hardware will be identified. Once the system design and hardware are identified, we’ll create the complete system architecture. Creating System Architecture will freeze the design phase.

Implementation & Unit Testing: This will take the System Architecture as input which was developed during Design Phase. In this phase the system is divided into chunks/Units and the actual coding is started. The system is developed as small modules called Units, which will be integrated in next phase. Each unit is developed and tested for its functionality. We call this process as Unit Testing. Unit testing is done by the developer who is developing the corresponding Unit.  This phase is over once the individual Units are developed and tested.

Integration & System Testing: This phase will take the Units developed in “Implementation Phase” as input. During this phase each Units will be integrated with the other Units based on the system architecture. Once the Units are integrated we need to test that the functionalities of integrated Units as System. It means that we are checking, how the Units are functioning when integrated. This is called Integration Testing.  Once the integration is completed based on the system architecture we’ll call it as a “System”. Then we’ll start the system testing. During System testing, we’ll make sure that the developed system is meeting the customer requirements. The developed system will be delivered to the customers once the system testing is over.

Operations & Maintenance: This phase of Waterfall Model is virtually never ending process. Because sometimes issues are not captured during testing phase and will be captured when it’s deployed to the customer. So, we need to fix the issues and deploy it to the customer. This phase is called as Maintenance phase.

Advantages: The main advantage of the waterfall model is the departmentalization and managerial control. In this mode each phase is moved in a strict order without any overlapping or iterative steps.

Disadvantage: The main disadvantage of the model is that it doesn’t allow us to revise. Assume that the product is reached the Testing Phase and customer is requesting for a change. So, it’s very difficult to go back and do the change.  Because it’ll have impact on all phases.

Monday, 21 November 2011

Checkpoints in QTP


Checkpoints are used to verify the runtime value against the predefined value in a Test. Checkpoint are used to set pass/fail status in the Test Results file.
We have different types of checkpoints in QTP.

Standard Checkpoints:
Standard Checkpoints are used to verify a set of property values of standard objects.
Examples: Buttons,Radio Buttons, CheckBoxes etc.

Image Checkpoints:
Image checkpoints are used to verify a set of property values image objects.
Example: Image location, width, height etc.

Bitmap Checkpoints:
Bitmap checkpoints are used to compare the on screen bit map image with the bitmap already captured.
Example: Pixel by pixel comparison of on screen bit map with existing bit map

Table Checkpoints:
Table checkpoints are used to compare the value of table displayed on the screen with the predefined values.

Text Checkpoints:
Text checkpoints are used to compare the text displayed on the application with the expected text.

TextArea Checkpoint:
This checkpoint is used to verify whether the text is displayed in a specified area on the application.

Accessibility Checkpoint:
This checkpoint is used to verify whether the areas in a web application that do not comly with W3C standards.

Page Checkpoints:
These checkpoints are used to verify the properties on a page.
Example: Links, Page Load Time etc.

DataBase Checkpoints:
These checkpoints are used to validate the database entry specified in the checkpoint.

XML Checkpoints:
Used to validate the contents of a XML file.

Tuesday, 15 November 2011

Tips To Become A Good Software Tester

In this article am trying to give some tips for the software test engineers to be at their best.

01. Test engineers should be involved from the requirement phase of the project. They should understand the requirement of all modules in the project.
02. Based on the understanding of the module, the Test Engineer should implement some process.The same process should be followed by all the resources in the ream. If we do so, we can filter most of the issues at initial phase itself.
03. The test engineers can create some template to follow.They should force all resources in the team to follow the same template.
04. If there are any changes in the requirement the same should be updated in the testing document. It's always better to keep the back up of the document based on the old requirement. It'll not be useful if the requirement is changed. Still we can keep it.
05.Once the requirement is finalized divide the project into chunks. It'll be helpful to know which module have more priority than other module.
06. Once the project is divided into chunks, identify the impacted areas. It means that the issue in one module may impact the behavior of other module.So, those type of modules should be given high priority.
07. Then prepare test scenarios for each module first.Then we can write the test scenarios for the impacted areas.
08. Do the peer review as soon as the test scenarios are ready.It'll be helpful to clarify if there is any doubt. Then we can use the standard template to write the test cases.
09. Test cases should clearly describe the action to be done. Number of steps should be less as well as descriptive.Based on the functionality we can give the priority of the test cases as High,Medium, Low.
10.Once the test cases are ready we can match the cases with requirement to make sure that all modules has been covered.
11. The most important thing is identify the module which has the complex code with the help of developer.We have to give more attention to the specific modules.

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | JCPenney Coupons