Create and run GUI tests

This lesson describes how to create and run a GUI test to test the MyFlight sample app. Start by creating a GUI test and actions that provide the tests structure.

For more details, see Explore the sample MyFlight application.

Create a GUI test and actions

Start by creating a GUI test to verify the MyFlight sample app functionality.

Do the following:

  1. Click the Add drop-down in the toolbar, and select Add 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 Add.

    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 MyFlight 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 action are updated in all referenced actions in any other tests. Resusable actions are read-only in the tests that reference them.

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: