5.
1 Quick Test Professional (QTP)
Quick Test Professional (QTP), now known as Unified Functional Testing (UFT), is a popular
automation testing tool developed by Micro Focus. It is used for functional and regression testing
of software applications. QTP/UFT offers a comprehensive set of features and capabilities that
make it a preferred choice for automating test scripts and ensuring software quality. Here are
some key aspects and features of QTP/UFT:
Features of QTP/UFT:
Graphical User Interface (GUI):
QTP/UFT provides a user-friendly interface for creating, maintaining, and executing automated
test scripts. Testers can easily navigate through different features and functionalities using a
graphical interface.
Object Repository:
QTP/UFT uses an Object Repository to store and manage the properties and methods of
application objects (such as buttons, fields, windows) that are being tested. This facilitates easy
object identification and maintenance of test scripts.
Record and Playback:
QTP/UFT allows testers to record user actions on the application under test (AUT) and
automatically generate corresponding test scripts. These scripts can be replayed to execute the
same actions, enabling quick creation of automated tests.
Keyword-Driven Framework:
QTP/UFT supports keyword-driven testing, where test scripts are created using keywords that
represent specific actions or operations. This approach enhances test script readability and
maintainability.
Data-Driven Testing:
QTP/UFT enables data-driven testing by allowing testers to parameterize test inputs and link
them to external data sources such as Excel spreadsheets or databases. This facilitates testing of
the application with different datasets.
Integration with IDEs:
QTP/UFT integrates seamlessly with popular Integrated Development Environments (IDEs) such
as Visual Studio and Eclipse. This allows testers to leverage advanced coding capabilities for
scripting and customization.
Support for Multiple Technologies:
QTP/UFT supports testing of applications built using various technologies including web-based
applications, desktop applications, SAP, Java, .NET, Oracle, and more. It provides dedicated
add-ins for different technologies.
Built-in Checkpoints and Reporting:
QTP/UFT offers built-in checkpoints to verify expected outcomes during test execution, such as
text, images, database content, etc. It also generates detailed test execution reports for analysis
and troubleshooting.
Integration with Test Management Tools:
QTP/UFT can be integrated with test management tools like Micro Focus ALM (Application
Lifecycle Management) for test planning, execution, and reporting within a structured test
management framework.
Advantages of QTP/UFT:
Efficiency: Automation using QTP/UFT reduces manual effort and accelerates the testing
process.
Reusability: Test scripts created in QTP/UFT are reusable, allowing for efficient test
maintenance and scalability.
Comprehensive Testing: QTP/UFT supports testing across multiple technologies and
provides a wide range of testing capabilities (functional, regression, data-driven, etc.).
Integration: QTP/UFT integrates with other tools and technologies in the testing
ecosystem, enhancing collaboration and productivity.
Vendor Support: As a widely used commercial tool, QTP/UFT receives regular updates,
patches, and technical support from Micro Focus.
Drawbacks of QTP/UFT:
Cost: QTP/UFT is a commercial tool and requires licensing fees, which may not be
feasible for all organizations.
Learning Curve: Mastering QTP/UFT requires training and experience due to its rich
feature set and complexity.
Limited Cross-Platform Support: While QTP/UFT supports multiple technologies, its
compatibility with certain niche platforms or environments may be limited.
5.2 Creating Check Points
In the context of automated testing using tools like Quick Test Professional (QTP) or Unified
Functional Testing (UFT), creating checkpoints is a fundamental technique to verify expected
outcomes during test execution. Checkpoints help ensure that the application under test (AUT)
behaves as expected and meet specified criteria. Here's how you can create checkpoints in
QTP/UFT:
Types of Checkpoints in QTP/UFT:
1. Standard Checkpoints:
Standard checkpoints allow you to check the property values of an object in the AUT against
expected values during test execution.
To create a standard checkpoint:
Navigate to the step in your test where you want to add the checkpoint.
Click on "Insert" > "Checkpoint" > "Standard Checkpoint" from the QTP/UFT menu.
Select the object in the AUT for which you want to verify properties (e.g., text, value,
state).
Specify the properties and expected values to be verified.
Complete the checkpoint wizard and add the checkpoint to your test script.
2. Text Checkpoints:
Text checkpoints verify the text content displayed in a specific area of the AUT, such as a
webpage, window, or dialog box.
To create a text checkpoint:
Navigate to the desired step in your test script.
Click on "Insert" > "Checkpoint" > "Text Checkpoint" from the QTP/UFT menu.
Select the text element in the AUT (e.g., a label, paragraph, field).
Specify the expected text value to be verified.
Complete the checkpoint wizard to add the text checkpoint.
3. Bitmap Checkpoints:
Bitmap checkpoints capture and compare graphical images or screenshots of an object or area
within the AUT.
To create a bitmap checkpoint:
Navigate to the appropriate location in your test script.
Click on "Insert" > "Checkpoint" > "Bitmap Checkpoint" from the QTP/UFT menu.
Define the area or object in the AUT to capture as a bitmap.
Provide a baseline bitmap (expected image) for comparison.
Complete the checkpoint configuration to add the bitmap checkpoint.
Database Checkpoints:
Database checkpoints validate data retrieved from a database query during test execution.
To create a database checkpoint:
Navigate to the relevant test step.
Click on "Insert" > "Checkpoint" > "Database Checkpoint" from the QTP/UFT menu.
Define the database connection details and query to retrieve data.
Specify the expected results or compare against baseline data.
Finalize the database checkpoint setup.
Steps to Create Checkpoints in QTP/UFT:
1. Identify the Checkpoint Type: Determine the type of checkpoint required based on the
verification criteria (e.g., object properties, text content, graphical appearance).
2. Navigate to Test Step: Open the test script or recording in QTP/UFT where you want to
insert the checkpoint.
3. Insert Checkpoint:
Click on "Insert" from the QTP/UFT menu.
Choose the appropriate checkpoint type (standard, text, bitmap, database) from the
checkpoint submenu.
4. Configure Checkpoint Properties:
Follow the on-screen instructions to configure the checkpoint properties, such as
selecting the object, specifying verification criteria, and defining expected values.
5. Complete Checkpoint Setup: Provide necessary inputs and settings to finalize the
checkpoint configuration.
6. Verify and Execute: Run the test script to execute the checkpoint and verify the
specified criteria against the AUT.
Review Results: After test execution, review the test results to determine if the checkpoints pass
or fail based on the verification outcomes.
5.3 Testing a Database Application:
Functional Testing:
Data Integrity: Verify that data entered into the application is stored correctly in the
database.
Data Retrieval: Test database queries and ensure they retrieve accurate and expected
data.
Data Manipulation: Validate CRUD (Create, Read, Update, Delete) operations on
database records.
Performance Testing:
Query Performance: Measure and optimize database query performance under different
load conditions.
Concurrency: Test how the application handles multiple concurrent database
transactions.
Security Testing:
Access Control: Ensure proper authentication and authorization mechanisms are in place
to access the database.
Data Encryption: Check if sensitive data is encrypted properly to protect against
unauthorized access.
Integration Testing:
Database Connections: Test integration between the application and the database to
ensure seamless data flow.
Error Handling: Validate error handling and recovery mechanisms for database-related
errors.
Data Migration Testing:
Import/Export: Test data import and export functionalities to ensure data consistency
and accuracy during migration.
5.4 Testing a Web Application:
Functional Testing:
UI Testing: Validate the user interface elements such as forms, buttons, links, and
navigation.
Functionality Testing: Test all features and functionalities of the web application.
Browser Compatibility: Ensure the web application works correctly across different
browsers and devices.
Performance Testing:
Load Testing: Assess how the web application performs under various levels of user
traffic.
Stress Testing: Determine the application's stability and response time under extreme
load conditions.
Security Testing:
Authentication and Authorization: Test login/logout processes and access control
mechanisms.
Data Security: Check for vulnerabilities such as SQL injection, cross-site scripting
(XSS), and data leakage.
Usability Testing:
User Experience (UX): Evaluate the overall user experience, including ease of use,
accessibility, and responsiveness.
Navigation Testing: Ensure smooth and intuitive navigation throughout the application.
Integration Testing:
Third-Party Integrations: Test integrations with external services (e.g., payment
gateways, APIs) used by the web application.
Database Interaction: Validate data exchange between the web application and the
underlying database.
Regression Testing:
Continuous Testing: Perform regression tests to ensure that new updates or fixes do not
introduce new issues.
Common Testing Techniques for Both Applications:
1. Database Validation:
Use SQL queries to directly validate data stored in the database against expected values.
2. End-to-End Testing:
Test the entire application flow, including interactions between the web interface and the
database backend.
3. Data Consistency:
Ensure data consistency across different layers of the application (UI, business logic, database).
4. Error Handling:
Validate error messages and error handling scenarios for both applications.
5. Automation Testing:
Implement automated test scripts using tools like Selenium for web applications and database-
specific tools for database applications.
6. Cross-Functional Testing:
Collaborate with developers, database administrators (DBAs), and other stakeholders to ensure
comprehensive testing coverage.