Monday 20 February 2017

How to Record a QTP Script

Before you start recording your QTP script, you need to identify the TEST STEPS that need to be automated.

There are many possible scenarios to test. We will select a simple Test Scenario to begin with. "Check that user successfully logs in to the application on inputting valid Agent Name & Password"
Here are the test steps for this scenario
Test Step 1) Open Flight Reservation Application
Test Step 2) Enter Valid Agent Name
Test Step 3) Enter Valid Password
Test Step 4) Press Ok
Test Step 5) Close Application After Successful Login.
Lets automate these 5 steps in QTP

Steps to Record a Script in QTP

Step 1 In QTP click the record button.The Record and Run settings Dialog Box Opens.This box opens automatically each time you  begin recording a new test
Step 2 Record & Run settings shows a tabs corresponding to add-ins installed and loaded for your test.So, for example if you have SAP Add-in Installed and loaded you will see a SAP tab. The Windows Application tab is always available and be used for  environments, such as  Visual Basic, ActiveX, and terminal emulators.
For any Environment, the Record and Run settings can be classified into two generic groups
1) Record & Run on ANY window belonging to that particular environment
2)Record & Run on a SPECIFIC window belonging to that particular environment - which is the recommended Option
For the time being , lets stick to default settings .Once settings are done , QTP remembers and uses the same settings for additional record sessions on the same test, unless you manually open the Record and Run Settings dialog box to modify the settings.

How to use QTP IDE

This tutorial introduces the Quick Test Professional IDE.

To launch QTP, In Start Menu,
Choose Programs > Quick Test Professional Folder > Quick Test Professional or double click on the QTP icon 
The first time you start QTP, the Add-in Manager dialog box opens.
It Displays list of all installed add-in. You can select the add-in you want to load for the test and click "OK". You can later add or remove an Add-in after QTP has launched. For now stick to default and move ahead.
Recommendation you select only the add-ins required for your particular testing session . Because at times , different add-in interfere with each other degrading object identification and QTP's performance. QTP will remember the add-ins you load so that the next time you open QTP the add-ins you selected in the previous session are selected by default. Also, If you do not want this dialog box to open the next time you start QTP clear the Show on startup check box. Click OK.
The Start Page describes the new features in the current release-including links to more information about these features. It also provides links to Process Guidance, a tool that offers best practices for working with QTP. You can open a document from the list of Recently Used Files, or you can click the buttons in the Welcome! area to open new or existing documents. 

Flight Reservation Application in QTP Tutorials

This tutorial introduces Flight Reservation Application which will be used for hands-on for the rest of the tutorials.


Notes:
  • Flight Reservation Application comes pre-installed with QTP
  • Using Flight Reservation , you can book a flight between two cities,  even modify or delete and existing booking.
  • You may also fax a booking to a customer with your custom signature.
  • Flight Reservation has a  Reports and Graphs section which helps analyze the  ticket selling trends.
  • A small number of bookings is pre-populated for any new agent , so that you do not have to create test data.
  • The application has been designed to help learn all the features provided by QTP.At times , you may find this application buggy but your focus should not be technical accuracy of the application, but on its use as a  tool, to learn various features of QTP.

Quick Test Professional (qtp) Tutorial


HP QTP is an automated functional testing tool that helps testers to execute automated tests in order to identify any errors, defects or gaps in contrary to the expected results of the application under test. It was designed by Mercury Interactive and later on acquired by HP.  
 Why QTP the best testing tool?
  • It is an icon based tool that automates the regression and functional testing of an application
  • Both technical as well as non-technical tester can use QTP
  • It provides both features- Record as well as Playback
  • We can test Desktop as well as the Web based applications
  • It allows Business Process Testing (BPT)
  • QTP is based on scripting language VB script
  • It supports largest pool of software development environments like SAP, Oracle etc.. 
Advantages of QTP
  • It supports record and playback
  • It uses active screen to record scripts and helps tester in referring the screen object properties
  • It has excellent object identification process or mechanism
  • It supports different add-ins like Oracle, Java, SAP, NET, Web Forms, People soft, etc..
  • It allows you to enhance the existing tests even without the AUT through an active screen
  • It supports popular automation frameworks- keyword driven testing approach, modular testing approach, data driven testing approach, etc..
  • It comes with an inbuilt IDE
  • It can be integrated with Test management tools like Quality Center, Test Director, and Winrunner
  • Different types of suites like Smoke, Regression, Sanity can be easily maintained
  • It supports XML
  • Test reporting is possible through QTP for analysis purpose
  • Easy to maintain

Friday 3 February 2017

About Selenium

Selenium is a software testing framework for the web that facilitates the automation of browsers.

The Selenium project produces various tools for automation testing such as Selenium IDE, Selenium Remote Control (RC), Selenium Grid and Selenium 2.0 & WebDriver. 

Learning all the tools will give you many different options for approaching different automation problems.

The entire suits of tools result in a rich set of testing functions specially geared to the needs of testing of web application of all types

Why Selenium?

- Selenium is an open source tool with Corporate backing.
- The tests can then be run against most modern web browsers.
- Selenium deploys on Windows, Linux, and Macintosh platforms.
- It allows recording, editing, and debugging tests.
- Recorded tests can be exported in most language e.g. html, Java, .net, perl, ruby etc.
- Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser.

Selenium Components:

Selenium 1/ Selenium RC or Remote Control: Selenium RC was the main Selenium project for a long time before the Selenium Webdriver merge brought up Selenium 2, the newest and more powerful tool.

Selenium IDE (Integrated Development Environment): The Selenium IDE is a simple but powerful Firefox extension that lets users record and replay sets of browser interactions as test cases.

Selenium Grid: Selenium Grid is a server that allows tests to use web browser instances running on remote machines.


It allows the Selenium RC solution to scale for large test suites and for test suits that must be run in multiple environments. Different tests can be run at the same time on different remote machines.

Selenium Web Driver: It also provides a test domain-specific language (Selenese/Webdriver) to write tests in a number of popular programming languages, including Java, C#, Groovy, Perl, PHP, Python and Ruby.

It is the newest addition to the Selenium toolkit. This provides all sort of awesome features, including a more cohesive and object oriented API as well as an answer to the limitation of the old implementation.

Selenium WebDriver:

The primary new feature in Selenium 2.0 is the integration of the WebDriver API. WebDriver is designed to provide a simpler, more concise programming interface in addition to addressing some limitations in the Selenium-RC API.

It enables you to use a programming language to write test scripts in different programming languages like html, Java, .net , perl, ruby and which enables you to use conditional operations, looping and other programming concepts which makes you test script robust.

Selenium-WebDriver was developed to better support dynamic web pages where elements of a page may change without the page itself being reloaded.

WebDriver’s goal is to supply a well-designed object-oriented API that provides improved support for modern advanced web-app testing problems.

Mobile Application Testing

In the fast growing world the mobile phone is not only a device to make and receive telephone calls but also a multipurpose personal gadget.

There are more technological improvement and the propagation on mobile devices with different Operating Systems like Apple iOS, Andriod, Windows Phone, Blackberry, Symbian etc. In the fast growing world there are new challenges for hardware manufactures to stay in the competition.

Also the application developer needs to deliver best Apps over variety of platforms within a quick time.

What is Mobile Application Testing and Why it is needed?



In highly fragmented and competitive global market the mobile development cycle is of short period. For the vendor’s equanimity and overwhelming task to ensure long term success, the APP must be tested over different combination of platforms, operating systems and networks before launching to global.

In addition to this, similar to Functional testing the non-functional testing like Security testing, usability testing etc. also plays an important role. The effective test planning in Mobile Application testing makes helps to improve the quality of Mobile Apps.

Now we are going to explore how to achieve the mobile application quality and get better competence on mobile testing.

We are also learning on what Mobile Automation is and what the challenges in Mobile Application Test Automation? Many testers are confused about Approaches for Native and Hybrid Mobile Apps, so this discussion will shed some light on this as well.

In the market there are different varieties of Mobile Automation Tools available, however each mobile automation tools has its own advantages and disadvantages.

As a result, we will see “What are the Key Principles for selecting the right Automation tool for Mobile Apps Testing?”

The mobile automation testing is extremely efficient approach to test the Mobile Applications which gives us the considerable returns if you choose right tools for Mobile Test Automation.

What is Software Testing..?

Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test, Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software implementation.

Also software testing is a process of executing a program or application with the intent of finding the software bugs.

It can also be stated as the process of validating and verifying that a software program or application or product:

Meets the business and technical requirements that guided it’s design and development
Works as expected
Can be implemented with the same characteristic.

Let’s break the Definition of Software Testing into the following parts:

1) Process:  Testing is a process rather than a single activity.

2) All Life Cycle Activities: Testing is a process that’s take place throughout theSoftware Development Life Cycle (SDLC).

The process of designing tests early in the life cycle can help to prevent defects from being introduced in the code. Sometimes it’s referred as “verifying the test basis via the test design”.
The test basis includes documents such as the requirements and design specifications.

3) Static Testing:  It can test and find defects without executing code. Static Testing is done during verification process. This testing includes reviewing of the documents (including source code) and static analysis. This is useful and cost effective way of testing.  For example: reviewing, walkthrough, inspection, etc.

4) Dynamic Testing:  In dynamic testing the software code is executed to demonstrate the result of running tests. It’s done during validation process. For example: unit testing, integration testing, system testing, etc.

5) Planning:  We need to plan as what we want to do. We control the test activities, we report on testing progress and the status of the software under test.

6) Preparation:  We need to choose what testing we will do, by selecting test conditions and designing test cases.

7) Evaluation:  During evaluation we must check the results and evaluate the software under test and the completion criteria, which helps us to decide whether we have finished testing and whether the software product has passed the tests.

8) Software products and related work products:  Along with the testing of code the testing of requirement and design specifications and also the related documents like operation, user and training material is equally important.



Testing techniques include the process of executing a program or application with the intent of finding software bugs (errors or other defects).

It involves the execution of a software component or system component to evaluate one or more properties of interest. In general, these properties indicate the extent to which the component or system under test..
  • Meets the requirements as mentioned in its design and development,
  • Responds correctly to all kinds of inputs,
  • Performs its functions within an acceptable time,
  • Its sufficiently usable,
  • Can be installed and run in its intended environments, and
  • Achieves the general result its stakeholders desire.
As the number of possible tests for even simple software components is practically infinite, all software testing uses some strategy to select tests that are feasible for the available time and resources.

As a result, software testing typically (but not exclusively) attempts to execute a program or application with the intent of finding software bugs (errors or other defects).

Software testing can provide objective, independent information about the quality of software and risk of its failure to users and/or sponsors.

Software testing can be conducted as soon as executable software (even if partially complete) exists. The overall approach to software development often determines when and how testing is conducted.

For example, in a phased process, most testing occurs after system requirements have been defined and then implemented in testable programs. In contrast, under an Agile approach, requirements, programming, and testing are often done concurrently.