Business Process Testing in UFT - End-to-end scenario

Relevant for: business process tests and flows

When you plan to use Business Process Testing in UFT to test your application, there are a number of stages, from planning to the test run. This use-case scenario will show the end-to-end process of using Business Process Testing in UFT to test a real application.

For the purposes of this use-case-scenario, the application being tested is the UFT sample flight reservation application (Start > All Programs > HPE Software > HPE Unified Functional Testing > Sample Applications > Flight GUI).

View a slideshow on showing an end-to-end process of using Business Process Testing

Analyze your application

Determine the technologies used in your applications.

This is important as you must load the appropriate add-ins in UFT to test your application's technologies. Depending on what technologies your application uses, UFT loads the necessary tools that enable UFT to communicate with and recognize objects in your application.

For the flight reservation application, the application is based on Windows Presentation Foundation (WPF) technologies, so you must load the WPF Add-in in UFT.

Determine the functionality that you want to test.

Before you begin, you must consider how a user uses the application. Once you do this, you can determine how what resources you need and what components you need to create for the different part of your applications.

For the flight reservation application, you have a multiple areas of the application, with a number of user actions:

  1. Login window: The user logins into the flight reservation application

  2. Flight search window: The user searches for available flights or booked flights, including:

    • Find a flight based on departure and arrival cities and departure date

    • Find a flight based on the seating class of the passenger

    • Search for booked flights by customer name, flight number, or flight date

  3. Flight selection window: Select a flight from the available flights

  4. Flight confirmation and booking window: Confirm the selected flight and entering the customer details, including:

    • Entering the customer's name

    • Entering the exact number of tickets needed

    • Booking the flight

    • Waiting for confirmation of the order from the application

    • Restarting the reservation process

Decide how to divide the testable functionality into smaller units

By dividing the test into smaller chunks, you can make it more manageable and easier to follow.

Based on this list of application windows and tasks, you can create four different components for the different areas of the application.

Back to top

Prepare your test infrastructure.

First, you need to load the WPF add-in in the Add-in Manager. This loads the necessary support for UFT to work with WPF-based applications.

Second, after UFT starts, you must then connect to ALM to enable yourself to use Business Process Testing with UFT. Once you are successfully connected with ALM, UFT displays an icon in the lower right corner of the main window.

Third, you must create or have a default application area. This application area contains the object repositories, custom function libraries, and application settings:

Lastly, in the application area, settings you must configure UFT to work with the flight reservation application:

Back to top

Create the business process test and add steps to the test.

Once you have created a default application area and configured it work with the flight reservation application, you can begin creating a business process test. For this use-case scenario, you will record the steps and create the business process test.

Before recording, set the options for how UFT records a business process test in the Recording Settings pane of the Options dialog box (Tools > Options > BPT Testing tab > Recording Settings node):

For this scenario, you instruct UFT to Automatically parameterize steps using Business Component Parameters. This enables UFT to create a parameter for each object in your application. After recording your test, you can later parameterize steps in the test using these parameters.

However, before you can begin adding steps to the test, you create a new business process test.

After the test is created, then press the Record button in the toolbar to start creating the test. UFT prompts you to create a business component. When specifying the settings for the component, select the application area created previously:

After you add this business component, the UFT window goes into the background and the Record Toolbar is minimized. Open the flight reservation application:

Perform actions in your application and UFT records the actions. As you perform these actions, the Record Toolbar is updated with the number of steps recorded:

In addition, as you record, you have the option of creating new components to divide the test into logical parts. Click the Add New Business Component button in the Record Toolbar to create a new business component:

Subsequent steps are recorded in the new business component.

Continue performing steps in the flight reservation application, and UFT continues recording these steps into the test. In addition, you should logically create additional business components for the Select Flight page (the table where you select available flights) and the Flight Confirmation page (where you enter passenger details).

After recording all the user actions, press the Stop button in the Record Toolbar. The Record Toolbar closes, and UFT creates the components and orders them in the test:

You do not need to save anything - it is automatically saved in ALM and the components are saved in the specified place in ALM.

Back to top

Enhance your test.

Now that your basic test has been created, you can modify the test in a number of ways:

Group components

Select components and group them together to enable certain functionalities (like common parameterization, running, etc.) for all components in the group:

Change parameter values across iterations

If you select any component in the test, and then view the Parameters tab in the Properties pane, you see that UFT has automatically created component parameters for the objects used in the component steps.

In the data pane, add additional iterations and change the values of the parameters in other iterations:

Set run conditions for components in the test If you select a component, in the Properties tab of the Properties pane, you can specify to stop (Exit) or continue (Continue) the test if a component fails on a particular test run.
Create a test configuration to change the parameterization of your components across test runs

In the Test Configurations tab of the Properties pane, you can create a test configuration to vary the data your test uses when running. (This data is created by uploading an Excel spreadsheet.

Then, when UFT runs the test, it uses the data provided by the test configuration instead of the set values provided in the individual components.

Back to top

Run your test.

In the toolbar, click the Run button. UFT automatically runs the test, performing each step in the application:

Back to top