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).
|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:
|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.
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:
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.
Now that your basic test has been created, you can modify the test in a number of ways:
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.
In the toolbar, click the Run button. UFT automatically runs the test, performing each step in the application: