Create your test structure

Start testing the MyFlight sample app by creating an OpenText Functional Testing solution, a GUI test, and actions that provide the test structure.

For information about the sample app, see Explore the sample MyFlight application.

Start OpenText Functional Testing and create a solution

Use an OpenText Functional Testing 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:

  1. Open OpenText Functional Testing by clicking the icon saved on your desktop, or selecting OpenText Functional Testing from the Start menu.

    The path may vary depending on OpenText Functional Testing versions.

  2. In the Add-ins Manager window that shows by default when you start OpenText Functional Testing, ensure that only the WPF Add-in is selected. Clear all other Add-ins, and then click OK to open OpenText Functional Testing.

    Tip: Whenever starting OpenText Functional Testing, load the relevant OpenText Functional Testing Add-ins for your app. If your app is written in Java, load the OpenText Functional Testing Java Add-in. Clear irrelevant add-ins to speed up your OpenText Functional Testing performance.

    The MyFlight app is written in WPF, and therefore this tutorial requires the WPF Add-in.

  3. In OpenText Functional Testing, click the New drop-down in the toolbar, and select Solution.

  4. 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.

Back to top

Create a GUI test and actions

Create a GUI test to verify the MyFlight sample app functionality.

To create the test:

  1. Click the New drop-down in the toolbar, and select New Test.

  2. 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.

  3. 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.
  4. Create a new FlightFinder action.

    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.

  5. Repeat the previous step twice to create two more actions with the following names:

    • SelectFlight
    • FlightConfirmation
  6. 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.

Back to top

More about reusable test actions

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.

Copied actions

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.

Back to top

Next steps: