1) About this Tutorial
1.1) How This Tutorial Is Organized
1.2) Who Should Read this Tutorial
1.3) Using QucikTest Professional with Business Process Testing.
2) Introducing Quick Test
2.1) Benefits of Automated Testing
2.2) Testing Process
2.3) QuickTest Window
3) Analyzing Your Application
3.1) Getting to Know Your Application
3.2) Exploring the Mercury Tours Web Site
3.3) Creating an Action
4) Creating Object Repositories
4.1) Introducing Test Objects and Object Repositories
4.2) Learning Objects in Your Application
4.3) Using Multiple Object Repositories
5) Creating Functions and Function Libraries
5.1) Introducing Functions and Function Libraries
5.2) Creating a Function
5.3) Associating the Function Library with Your Test
6) Creating a Test
6.1) Preparing to Create a Test
6.2) Adding Steps to the Login Action
6.3) Analyzing the Login Action in the Keyword View
6.4) Adding the Remaining Steps to Your Test
6.5) Dividing an Action into Two Actions
7) Running and Analyzing Tests
7.1) Running a Test
7.2) Analyzing Run Results
8) Creating Checkpoints and Using Functions
8.1) Understanding Checkpoint Types
8.2) Checking Objects
8.3) Checking Pages
8.4) Checking Tables
8.5) Checking Text
8.6) Managing Checkpoints in the Object Repository
8.7) Running and Analyzing a Test with Checkpoints
8.8) Performing a Check Using a Function
9) Parameterizing Tests
9.1) Defining a Data Table Parameter
9.2) Adding Parameter Values to a Data Table
9.3) Modifying Steps Affected by Parametrization
9.4) Parameterizing an Action
9.5) Running and Analyzing a Parametrized Test
10) Where Do You Go from Here?
10.1) Testing Your Own Application - Getting Started
1) About This Tutorial
Welcome to the QuickTest Professional tutorial. The tutorial is a self-paced guide that teaches you the basics of testing your application with QuickTest, the powerful functional testing solution.
This tutorial will familiarize you with the process of creating and running automated tests and analyzing the test results. After completing the tutorial, you can apply the skills you have learned to your own application or Web site.
1.1) How This Tutorial Is Organized
This tutorial contains the following lessons:
Compares automated and manual testing methods. It introduces the QuickTest testing process and familiarizes you with the QuickTest user interface and the sample Mercury Tours Web site.
Explains what you need to consider before you begin testing your application.
Describes how to create object repositories and associate them with your test actions.
Describes how to create functions and function libraries, and how to associate them with your test.
Teaches you how to add steps to your test actions and provides an overview of the resulting Keyword View display.
Describes how to run a test and view the test results.
Provides an overview of different checkpoint types and explains how to add checkpoints to your test to verify that information in your application is displayed as expected.
Describes how to parameterize a test using Data Table parameters, and then run the test on multiple sets of data and analyze the results.
Shows you how to get started testing your own application.
1.2) Who Should Read This Tutorial
This tutorial is intended for users who are new to QuickTest. No prior knowledge of QuickTest is required. A general understanding of testing concepts and functional testing processes may be helpful, but is not mandatory.
1.3) Using QuickTest Professional with Business Process Testing
In addition to tests, QuickTest enables you to create business components for use in business process tests, if you have Quality Center with Business Process Testing support installed. The procedures described in this tutorial are designed for creating tests, but you can also apply the majority of these procedures to creating business components. For more information on business components and Business Process Testing, see the HP QuickTest Professional for Business Process Testing User Guide and the HP Business Process Testing User Guide.
2) Introducing QuickTest
This lesson provides you with an overview of automated testing and QuickTest, and gets you set up to perform the tutorial.
2.1) Benefits of Automated Testing
If you have ever tested applications or Web sites manually, you are aware of the drawbacks. Manual testing is time-consuming and tedious, requiring a heavy investment in human resources. Worst of all, time constraints often make it impossible to manually test every feature thoroughly before the application is released. This leaves you wondering whether serious bugs have gone undetected.
Automated testing with QuickTest addresses these problems by dramatically speeding up the testing process. You can create tests that check all aspects of your application or Web site, and then run these tests every time your site or application changes.
As QuickTest runs tests, it simulates a human user by moving the cursor in a Web page or application window, clicking GUI (graphical user interface) objects, and entering keyboard input; however, QuickTest does this faster than any human user.
2.2) Testing Process
The QuickTest testing process consists of the following main phases:
- Analyzing your application
- What are your application's development environments (for example Web, Java, or .NET)? You will need load QuickTest add-ins for these environments to enable QuickTest to identify and work with the objects in your application.
- What business processes and functionality do you want to test? To answer this, think about the various activities that customers perform in your application to accomplish specific tasks.
- Consider how to divide these business processes into smaller units. You will be creating actions based on these tasks. Smaller and more modular actions make your tests easier to read and follow, and help ease maintenance in the long run.
- Preparing the testing infrastructure
- Building your tests and adding steps to them
- Enhancing your test
- Debugging, running, and analyzing your test
- Reporting defects
The first step in planning your test is to analyze your application to determine your testing needs.
At this stage, you can already begin creating test skeletons and adding actions to them.
Based on your testing needs, you determine what resources are required and create these resources, accordingly. Resources include shared object repositories containing test objects (which are representations of the objects in your application), function libraries containing functions that enhance QuickTest functionality, and so on.
You also need to configure QuickTest settings so that QuickTest will perform the tasks you need, such as displaying a results report every time you run a test.
After the testing infrastructure is ready, you can begin building your tests. You can create one or more empty tests and add actions to them to create the testing skeletons. You associate your object repositories with the relevant actions, and associate your function libraries with the relevant tests, so that you can insert steps using keywords. You may also need to configure test preferences at this point.
Inserting checkpoints into your test lets you search for a specific value of a page, object, or text string, which helps you determine whether your application is functioning correctly.
Broadening the scope of your test, by replacing fixed values with parameters, lets you check how your application performs the same operations with multiple sets of data.
Adding logic and conditional or loop statements enables you to add sophisticated checks to your test.
You debug a test to ensure that it operates smoothly and without interruption. After the test is working correctly, you run it to check the behavior of your application. While running, QuickTest opens the application and performs each step in your test.
You examine the test results to pinpoint defects in your application.
If you have Quality Center installed, you can report the defects you discover to a database. Quality Center is the HP test management solution.
Before you begin creating tests, you should familiarize yourself with the main QuickTest window.
The image below shows a QuickTest window as it would appear after you create a test, with all toolbars and the Data Table and Resources panes displayed:
Document Area
The document area of the QuickTest window can display the following:
- Test. Enables you to create, view, and modify your test in the Keyword View or Expert View.
- Function Library. Enables you to create, view, and modify functions (operations) for use with your test.
- Start Page. Welcomes you to QuickTest and provides links to Process Guidance. You can use the shortcut buttons to open new and existing documents.
Key Elements in the QuickTest Window
In addition to the document area, the QuickTest window contains the following key elements:
- QuickTest title bar. Displays the name of the active document. If changes have been made since it was last saved, an asterisk (*) is displayed next to the document name in the title bar.
- Menu bar. Displays menus of QuickTest commands.
- Standard toolbar. Contains buttons to assist you in managing your test.
- View toolbar. Contains buttons to view the various panes that can assist you in the testing process.
- Tools toolbar. Contains buttons to assist you in setting options, checking syntax, and working with the Object Spy.
- Automation toolbar. Contains buttons to assist you in the testing process.
- Insert toolbar. Contains buttons to assist you in inserting steps, actions, checkpoints, and output values into your test.
- Edit toolbar. Contains buttons to assist you in editing your test steps.
- Debug toolbar. Contains buttons to assist you in debugging tests.
- Action toolbar. Contains buttons and a list of actions, enabling you to view the details of an individual action or the entire test flow.
- Document tabs. Enables you to navigate open documents in the document area by selecting the tab of the document you want to activate (bring into focus).
- Keyword View. Contains each step, and displays the object hierarchy, in a modular, icon-based table.
- Expert View. Contains each step as a VBScript line. In object-based steps, the VBScript line defines the object hierarchy.
- Status bar. Displays the status of the QuickTest application and other relevant information.
Note: For information on all of the toolbar and menu options, see the HP QuickTest Professional User Guide.
Note: The Action toolbar is displayed only in the Keyword View. It is not displayed when you open QuickTest for the first time. You can display the Action toolbar by choosing View > Toolbars > Action. If you insert a reusable or external action in a test, the Action toolbar is displayed automatically in the Keyword View. For additional information, see the HP QuickTest Professional User Guide.
You can show or hide the following panes from the View menu:
- Test. Contains the Keyword View and Expert View tabs. A test is displayed in the testing document pane.
- Function Library. Enables you to create, view, and modify functions (operations) for use with your test. Function libraries open as separate tabs or windows in the documentation area, similar to tests.
- Start Page. Welcomes you to QuickTest and provides links to Process Guidance. You can use the shortcut buttons to open new and existing documents.
- Active Screen. Provides a snapshot of your application as it appeared when you performed a certain step during a recording session. (You can display the Active Screen by choosing View > Active Screen, or by clicking the Active Screen button .)
- Data Table. Assists you in parameterizing your test. (You can display the Data Table pane by choosing View > Data Table, or by clicking the Data Table button .)
- Debug Viewer. Assists you in debugging your test. The Debug Viewer pane contains the Watch, Variables, and Command tabs. (The Debug Viewer pane is not displayed when you open QuickTest for the first time. You can display the Debug Viewer by choosing View > Debug Viewer.)
- Information. Displays a list of syntax errors found in your test and function library scripts. (You can display the Information pane by choosing View > Information.)
- Missing Resources. Provides a list of the resources that are specified in your test but cannot be found, such as missing Recovery Scenarios and missing Function Libraries. (The Missing Resources pane is not displayed when you open QuickTest for the first time. You can display the Missing Resources pane by choosing View > Missing Resources, or by clicking the Missing Resources button .)
- Process Guidance. Displays two panes that provide procedures and descriptions on how to best perform specific processes, such as creating a test in QuickTest. The Process Guidance Activities pane lists the activities that you can perform, such as adding steps to a test. The Process Guidance Description pane describes the tasks that you need to perform for a selected activity. Your organization may also provide you with process guidance that is accessible from these panes. (You can display the Process Guidance panes by choosing View > Process Guidance, or by clicking the Process Guidance panes button .)
- Available Keywords. Displays all the keywords available to your test. Enables you to drag and drop objects or calls to functions into your test. (You can display the Available Keywords pane by choosing View > Available Keywords, or by clicking the Available Keywords Pane button .)
- Test Flow. Displays the hierarchy of actions and action calls in the current test, and shows the order in which they are run. (You can display the Test Flow pane by choosing View > Test Flow, or by clicking the Test Flow Pane button .)
- Resources. Displays all the resources associated with your current test and enables you to manage these resources. (You can display the Resources pane by choosing View > Resources, or by clicking the Resources Pane button .)
- To Do. Displays and enables you to manage the tasks defined for the current test. The To Do pane also displays the TODO comment steps of the test's actions or currently open function libraries. (You can display the To Do pane by choosing View > To Do, or by clicking the To Do Pane button .)
Some of the panes and toolbar options listed above are described in detail in subsequent lessons. For information on other panes and toolbar options, see the HP QuickTest Professional User Guide.
You can also execute many menu commands using shortcut keys. For additional information, see the QuickTest at a Glance section in the HP QuickTest Professional User Guide.
Now that you are familiar with the main QuickTest window, take a few minutes to explore its components.
3) Analyzing Your Application
In this lesson, you will analyze an application to determine what needs to be tested, and you will learn to create an action in QuickTest. An action is a logical unit in your test that focuses on testing a particular part of your application.
3.1) Getting to Know Your Application
Before you begin creating tests, you need to determine what exactly you want to test in your application. To do this, you need to analyze your application in terms of its business processes—the distinct activities that customers perform in your application to complete particular tasks.
For the purpose of this tutorial, you need to become familiar with the Mercury Tours Web site. Mercury Tours is a sample Web application that simulates a Web-based flight information and reservation service. You can access the Mercury Tours Web site using any Web browser, but you can perform the tutorial using only Microsoft Internet Explorer.
As you navigate through this application, consider the following:
- How is the application divided? Are there separate areas for each activity? What are these areas? What are these activities? What are the expected outcomes for each activity?
- What screens need to be tested in each of these areas? What objects need to be tested in each screen?
- What activities might be used in more than one scenario? (For example, logging on to the application.) Think of these as "reusable" parts.
- What business processes might users perform using this application? One scenario discussed in this tutorial is reserving flights. Other scenarios might include making cruise or hotel reservations, or even registering on the Web site.
- Consider which development environments need to be supported for testing purposes. QuickTest provides add-ins to support many testing environments. You load these add-ins when you open QuickTest. When working with this tutorial, you need to load the Web add-in because Mercury Tours is a sample Web application. Your application might require you to load Java or other add-ins.
Analyzing your application in terms of its separate parts can help you to design your tests so that they comprise small, modular units, which are easier to understand, debug, and maintain over time.
good work.
ReplyDeletei started reading it after seeing its contents but do not see after 3.1 searched the whole site.Where are the reaming sections ?
ReplyDeleteSir i also started reading it after seeing its contents but do not see after 3.1 searched the whole site.Where are the reaming sections ?
Plzzzzzzzzzzzz sove itttsoooon...
good work on QTP. thanks for this one....
ReplyDeletewebsphere Online Training
Indian Cyber Army gives the best in the Cyber crime investigation. We have put our foot one-step forward launching an effective Summer Internship program.The Summer Internship 2018 registrations are open for 2nd batch starting from 2 June 2018. Our standard services of Cyber Crime Investigation are class apart owing to years of proficiency. We provide Advanced Cyber Security, Ethical Hacking, Digital Forensics, etc. trainings to keep India totally secure from the Cyber Offenders.
ReplyDeleteIndian Cyber Army validity in Ethical hacking training and Cybercrime investigation preparing learning and full help with essential and additionally propelled level moral hacking and cyber crime examination courses.
ReplyDelete