Design tests

This is a technology preview, enabling you to experiment with AI Codeless testing.

Design AI-based tests automatically, using UFT AI Codeless inspection, or manually, writing the steps in plain English.

Connect to UFT Mobile

UFT AI Codeless tests applications on mobile devices that are hosted in UFT Mobile.

This requires connecting to UFT Mobile, selecting a device and application to test, and launching the remote access window to view the application.

Note: UFT and UFT Developer must be closed in order to run UFT AI Codeless and connect to UFT Mobile.

The following steps are only required the first time you open UFT AI Codeless. Once you connect successfully to a UFT Mobile server, the next time you open the tool, it automatically connects. To disconnect from this server an connect to a different one, click on the Connected status in the masthead.

To connect to UFT Mobile:

  1. Open UFT AI Codeless from the Desktop shortcut or the Start menu.
  2. In the UFT AI Codeless interface, click CONNECT TO UFT MOBILE
  3. Enter the connection details: UFT Mobile server address, user name, password.
  4. If your organization requires proxy configuration, select Use proxy and enter the corporate proxy server address and credentials.
  5. If your UFT Mobile server is using the SSL mode, select Ignore certificate errors.
  6. Click VERIFY to check the validity of your credentials and then CONNECT. The masthead shows the Connected status.

Back to top

Open a mobile application

UFT AI Codeless tests applications on mobile devices that are hosted in UFT Mobile.

In order to create a test, you need to create an environment that consists of a device and a mobile application.

You can add up to 3 environments. Create the test in one of the environments. Then you can run the test on all the environments in a single run session, one after the other.

To create testing environments:

  1. Make sure you are connected to a UFT Mobile UFT AI Codeless server. For details, see Connect to UFT Mobile.
  2. In the ENV & RUN tab, click + ADD ENVIRONMENT.

    The Add Environment window opens.

  3. Select a mobile device and application/URL for your test.

    To test a mobile app:

    1. Select the Mobile App option.

    2. Click in the DEVICE box to open the UFT Mobile DEVICE page. Select a device and click the green arrow.

    3. Click in the APP box to open the UFT Mobile APP page. Select an app and click the green arrow. UFT Mobile only displays applications that match the platform of the device you selected.

      Caution: Do not select the UFTM Browser app, as UFT AI Codeless does not support testing this app.

    4. Specify whether to install the application on the device and whether to restart the app before running the test.

    To test a web app:

    1. Select the Mobile Web option.
    2. Select a device from UFT Mobile. Click in the DEVICE box to open the UFT Mobile DEVICE page. Select a device and click the green arrow.
    3. Enter the URL of the application you want to work with. The device's default browser is used to open the web application.
  4. Click DONE. The environment is added to the ENV & RUN tab. Repeat the above steps to add up to three environments.

  5. Open the remote access window to view the mobile application.

    Hover over the right section of an environment card, and click Launch.

    The remote access window opens in a separate window. For details about the remote access window, see Device control panel.

    An icon on the environment card indicates that it's open in the remote view.

  6. To close the remote access window, click the X in the corner of the window.

    Note: When you manually close the remote access window, the indicator on the environment card will still indicate a connection.

 

Back to top

Inspect your application for objects

After opening a mobile application in a remote access window, UFT AI Codeless can identify the objects in the application visually, similarly to the way a person would. You can then add steps to your test that perform operations on these objects.

For the types of objects Codeless identifies and the operations supported on these methods, see the AI testing section of the UFT Help Center.

To inspect your application for objects:

  1. In the remote access window, navigate to the page in your app whose objects you want to test.
  2. In UFT AI Codeless, make sure the remote access window is open, and click on the IDENTIFY tab. Click INSPECT. UFT AI Codeless begins inspecting your application.

    When the inspection is complete, UFT AI Codeless displays the current screen of your app, and highlights the objects that it visually detects. Select the Visual Elements and/or Texts check boxes to show the desired objects in your application.

    Tip: As you navigate within the device, to show the current screen, click the Refresh button .

  3. If UFT AI Codeless was unable to detect an object in an application, click the Help us improve link in the IDENTIFY tab. The Feedback Tool window opens the device's current screen, highlighting all of the detected objects. Provide details about the object and click SEND FEEDBACK. For details, see the Feedback Tool documentation.

Back to top

Add AI steps

Once you have the objects in your app displayed, you can add AI steps to your test with a single double-click.

To add AI test steps:

  1. Make sure you are in the IDENTIFY tab and that you have inspected your app's objects. The IDENTIFY tab shows the screen currently displayed in the remote access window. As you navigate within the device, click the Refresh button to show the current screen.
  2. Double-click on any of the highlighted objects on the displayed device. UFT AI Codeless adds the object to the test. For value and text fields, UFT AI Codeless first prompts you to confirm a value or to edit the text.

Since these steps were created with AI detection, they are marked with an AI indicator.

To edit or fine-tune these steps, see Manually create or edit test steps.

Back to top

Add property-based steps

You can also add property-based steps to your test using the built-in Spy engine. Use this option if the AI engine was unable to detect an object. Note that if you add property-based steps, you cannot run the test on a different platform (iOS vs. Android).

Note: The built-in FindText capability finds your text anywhere and clicks it, even if it is part of a larger text block. Inspection also identifies whole blocks of text, therefore generating FindTextBlock steps.

To add property-based test steps:

  1. Make sure the remote window is open. Click the IDENTIFY tab. This tab shows the current display of the device in the remote access window.
  2. Click SPY in the IDENTIFY BY PROPERTIES section. The focus moves to the remote access window. Click on one of the detected objects. UFT AI Codeless opens a dialog box with the detected object name and properties.
  3. Accept the default values or edit them as required.
  4. Click APPLY. A step is added to the UFT AI Codeless step list.

    Since these steps were created with property-based detection, they are marked with a PB (Property Based) icon.

  5. If necessary, modify the step. Click the EDIT STEP tab:

    1. Check the Object Hierarchy. To modify the captured value, select an entry from the drop down or click the Highlight Object button to locate the selected object in the app.
    2. Make the necessary edits, such as logical name, action, and if applicable, value.
    3. For additional step-editing options, see Manually create or edit test steps.

  6. Repeat the above steps to spy on additional objects.
  7. To test objects on another application screen, navigate to that screen in the remote access window. In UFT AI Codeless, go to the IDENTIFY tab and click the Refresh button.

Back to top

Manually create or edit test steps

You can also create tests steps manually by adding an object and an action, using the UFT AI Codeless artificial intelligence.

To manually add a test step:

  1. Make sure the remote window is open. Click the IDENTIFY tab. This tab shows the current display of the device in the remote access window. If it is not up to date, click the Refresh button.

  2. To add a new step, click the Add Step button at the bottom of the step list.

  3. In the EDIT STEP tab:

    1. Type a class in the Object Class drop down. Type the first letters to view a list of the available classes. Click the Highlight Object button to locate the selected object in the app.

    2. If applicable, type a name for the object.

    3. Select or accept the default action for the selected object. UFT AI Codeless adds your selections to the current step.

    4. For text steps, you can set the object class property to Partial Text. This capability finds your text anywhere and clicks it, even if it is part of a larger text block.

      If you select this option, a PT indicator is added to the test step.

    5. If relevant, click in the step and expand the Position section. Specify a position and index for the object.

      If you select this option, a P indicator is added to the test step.

  4. You can also type directly into the step box, using the syntax rules described in Test step syntax. As you type, if UFT AI Codeless detects an error or incomplete syntax, it displays a warning symbol.

    If you type your step directly, you may want to configure additional step details in the EDIT STEP tab, such as Position, Partial text, and Verify step options such as timeout and Stop run upon failure.

  5. To omit the step temporarily from your test, select the Disable this step check box. You can re-enable it any time. For details, see Manage the test steps.

Back to top

(Optional) Add verification steps to your test

Supported in UFT AI Codeless versions 15.0.1 or later.

You can add a verification step that checks whether an object exists or does not exist in the application. This may be helpful, for example, to make sure an object is present before performing an operation on it.

If the condition specified in the Verify step is not met, the step fails. For example, if the step is Verify the button exists, the step fails if the button does not exist.

A Verify object exists step on a property-based object may succeed even if the object is not visible in the application.

You can create a verification step using any the methods described above for adding a step.

To create a verification step using the EDIT STEP tab:

  1. Select an object for your step.

  2. Select the Verify action.

  3. Select the Exists or Does not exist option, to specify which condition the step checks. (Default: Exists)

  4. Define a Timeout in seconds for how long to wait for the step's condition to be met. (Default: 20)

  5. If you want the test run on the current environment to stop if the verification step fails, select Stop test run upon failure.

    Otherwise, the step failure is reported but the run continues. (Default: Run does not stop)

If you type a verification step directly into the step box, use the syntax rules described in Test step syntax. Then use the EDIT STEP tab to set the Timeout and Stop test run upon failure options.

If you select the Stop test run upon failure option, a Stop indicator is added to the test step.

Back to top

Manage the test steps

Once you have a list of steps, you can manage them by editing them, changing their order, removing non-relevant steps, or temporarily disabling them.

To manage the test steps:

  1. Edit the test steps using the syntax rules described in Test step syntax. As you type, the UFT AI Codeless engine indicates whether your syntax or object is valid. If it detects incomplete syntax, it displays a warning symbol.

  2. To reorder a step, select it and click on the vertical drag bar in the left margin. Drag the step to the desired location in the step list.

  3. To remove a step, select it, click the vertical ellipsis in the right margin, and choose Delete . The last remaining step cannot be deleted, but you can manually remove its content.

  4. To temporarily disable a step for the next run, select it and do one of the following: 

    • Click the vertical ellipsis in the right margin, and choose Disable.

    • Select Disable this step in the EDIT STEP tab

    To enable a disabled step, click the vertical ellipsis in the right margin, and choose Enable or clear the Disable this step option.

  5. When you finish creating all of the test steps, click Save to store your tests for future use.

Back to top

Next steps: