Start testing the MyFlight sample app by creating a UFT One solution, a GUI test, and actions that provide the test structure.
For information about the sample app, see Explore the sample MyFlight application.
Use a UFT One solution to serve as a container for your test. Add the GUI test and function libraries to the solution in this tutorial.
To create a solution:
Open UFT One by clicking the icon saved on your desktop, or selecting UFT One from the Start menu.
The path may vary depending on UFT One versions.
In the Add-ins Manager window that shows by default when you start UFT One, ensure that only the WPF Add-in is selected. Clear all other Add-ins, and then click OK to open UFT One.
Tip: Whenever starting UFT One, load the relevant UFT One Add-ins for your app. If your app is written in Java, load the UFT One Java Add-in. Clear irrelevant add-ins to speed up your UFT One performance.
The MyFlight app is written in WPF, and therefore this tutorial requires the WPF Add-in.Click for details if
you can't find the Add-in Manager or the WPF Add-in
If the Add-in Manager doesn't show by default, enable this from the UFT One Options. From within UFT One, select Tools > Options > General > Startup Options > Select Display Add-in Manager on startup.
If the WPF Add-in is not displayed, this means it was not installed with UFT One. To add it, run an Change of your installation, and select to install the .NET and WPF Add-ins.
In the File name field, enter MyFlightApplication, and click Create.
The new MyFlightApplication solution is shown in the Solution Explorer pane.
Tip: If the Solution Explorer is hidden, select View > Solution Explorer to display it.
Create a GUI test and actions
Create a GUI test to verify the MyFlight sample app functionality.
To create the test:
Click the New drop-down in the toolbar, and select New Test.
Select to add a GUI Test to the solution, and enter the test name as MyFlight.
Leave the Location with the default value, and then click Create.
A blank test opens, showing the MyFlight test flow in the canvas, and another tab for a blank action, named Action1.
The test is also shown in the Solution Explorer as a sub-node of the MyFlightApplication solution.
Rename Action1 with a logical name. In the canvas, right-click the Action1 box, and select Action Properties.
- In the Name field, enter Login.
- Enter an optional description.
- Keep the Reusable action checkbox selected. In the warning that opens, click Yes.
Right-click anywhere in the canvas, and select Call to New Action.
- In the Name field, enter FlightFinder.
- Keep both the Reusable Action and At the end of the test options selected.
Repeat the previous step twice to create two more actions with the following names:
- Save your test. When you save a test, all changes in any of the action tabs are also saved.
Your test now contains all the actions required to test the MyFlight app.
Tip: Double-click the Start or End of the test flow to open the read-only Test Flow Details action that controls the test flow.
Use actions to divide your test into logical sections, enabling you to create modular and efficient tests.
Each new action is stored as an internal action, local to its source test. Actions are created as reusable by default, enabling you to call them from other tests as external actions.
When you update reusable actions, changes made in the original, internal actions are updated in all referenced actions in any other tests. Reusable actions are read-only in the tests that reference them.
Note: If you rename the name of a reusable action, the name of the data sheet mapped to this action is not updated automatically in the tests that reference it.
To modify action steps in a separate test, insert a copy of the action. Copying the action creates a new internal action, in the separate test. These copies are not linked to the source test, and any changes in the original action are not updated in the copy.
Tip: If you plan to use the same or similar actions in many tests, you might consider creating a repository test to store your reusable actions. Then, you can insert calls to these existing actions from other tests, or use them as templates to copy from.