Skip to main content

Development

Automated Web Testing with HP ALM & UFT

When we talk about web browser automation, Selenium may come to mind first. Selenium is the most powerful open source automation tool, but it is just a standalone driver. It needs to be integrated with test framework TestNG/Junit, code repository SVN/Git, CI tools Jenkins/TeamCity and other test management platforms (e.g. Jira). It sounds a little bit complicated. Is there any integrated and powerful platform can fill all our testing requirement? HP Unified Functional Testing is such a tool and itself is a framework. It just comes bundled with test management & source code control tool HP Application Lifecycle Management (aka HP QC) to simplify test management.

Is there an integrated and powerful platform that can fill all of our testing requirements?

HP Unified Functional Testing can and is also a framework. It comes bundled with the test management & source code control tool HP Application Lifecycle Management (aka HP QC) to simplify test management.

Without a doubt, it is the most dominant commercial player in the market when it comes to functional automation. It’s an easy and extremely user-friendly tool that works well with Windows & web-based applications. It can easily integrate with ALM, the latest incarnation of flagship test management tools. In this blog, we will discuss how to integrate UFT with ALM.

1.Automated Test Scripts Development

UFT is an IDE and is mainly used for writing test scripts. Testers need to write the reusable functions. Input Data/Input Parameters are not hard-coded in the test scripts. Instead, these are stored and passed from external files/resources such as Microsoft Excel Spreadsheets. Furthermore, we can also use an object repository to manage our page objects. These are the components that are required for an UFT Script:

Driver Script –The Script that drives the entire execution. It performs the prerequisite and initial settings that are required for the execution. Checkpoints for each test step will be added in this script and it contains the call to other components (Functions).

Functional Library – The Associated Functions that form the Function Library. It usually contains common utilities, page operations, excel controller, and reporter etc. The shared function file that can use the extension .vbs or .qfl.

Object Repository – It stores all test objects in the Object Repository. The tester can use the Object Spy to identify page objects and add these objects to the Object Repository. Then we will use defined objects in our main driver scripts or shared function files. It is usually a shared object repository by nature and has a tsr extension.

Test Data – Parameters and DataTables can both be used for separating our test data, but DataTables are more popular as they support multiple sets of test data. A DataTable, similar to Microsoft Excel, helps the testers to create data-driven test cases that can be used to run an Action multiple times.

Recovery Scenario – We can add the “ApplicationCrash” recovery scenario, which re-runs our test in case our application (like chrome and IE) crashes.

Automated Web Testing with HP ALM & UFT

Figure 1: UFT Framework

Where should we store the code after we finish coding? Usual, y we can store and control the version of our source code by using ALM. All Main Driver Scripts (Test Cases) are stored in the Test Plan as in the catalogue tree below.

Automated Web Testing with HP ALM & UFT

Figure 2: Test Plan Tree

Save the associated function library files, object repository files and test data files under the “Test Resources” module of ALM, and these files will be picked up automatically during execution. All code is stored in classified folders.

Automated Web Testing with HP ALM & UFT

Figure 3: Test Resources Tree

2.Executing Scripts in ALM

A test set is created in the “Test Lab” Module for execution. After creating the test set, the test instances can be added from the test plan tree.

Automated Web Testing with HP ALM & UFT

Figure 4: Execute test case in Test Set

Click “Run” to trigger the test. It allows us to execute all test cases of selected test sets by clicking Run all. And we can also execute only the selected test instance. UFT will be launched in the background while the script is being executed.

Automated Web Testing with HP ALM & UFT

Figure 5: Run/Run all test cases

In addition, we can control the execution of test instances in a test set. Using the Execution Flow tab of the Test Lab module, you can specify a date and time, and set conditions for executing a test instance. A condition is based on the results of another specified test instance in the Execution Flow. By setting conditions, you can instruct the Test Lab module to postpone the execution of the current test instance until the other specified test instance has either finished running or passed. You can also set the sequence in which to execute the test instances.

Automated Web Testing with HP ALM & UFT

Figure 6: Schedule test execution

3.Analyze test result

All executed test results are located at the Test Lab and ALM allows users to generate reports and graphs dependent on the results in the Test Lab.

The analysis view module enables users to create, manage and view analysis items such as graphs, project reports, and Excel reports.

The Dashboard View helps users to design a dashboard page by selecting and arranging graphs on the page based on their requirements. It is very helpful for stakeholders/project managers to get a quick snapshot of the project status.

Automated Web Testing with HP ALM & UFT

Figure 7: Sample Dashboard

Conclusion

To summarize, Automation Testing Frameworks play a key role in software testing. HP has designed a powerful platform by combining UFT and ALM which allows you to customize the framework and library per different requirement. Execution can be scheduled and monitored efficiently.

Thoughts on “Automated Web Testing with HP ALM & UFT”

  1. HI am trying execute my UFT scripts through ALM I have uploaded the test case’s to HP- ALM but while execution am facing lot of performance issue,i.e HP-ALM is taking a lot of time to invoke UFT and also while execution test case is coming out as failed and if execute it in UFT directly it is passing .Any leads are appreciated.Thanks in advance.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories
Follow Us
TwitterLinkedinFacebookYoutubeInstagram