Creating an AFT Suite to run the tests on multiple mobile clouds

When you want to run the mobile tests simultaneously on devices connected to multiple clouds, you can create an AFT. You can configure the AFT Suite with details of the tests, devices on multiple mobile clouds, and the location from where the tests must be initiated.

Before you begin

You must have completed the following tasks:
  • Created or recorded mobile tests for the mobile application that you want to test.
  • You must have set up accounts and obtained valid credentials for more than one mobile cloud.
  • Noted the IDs or names of the devices connected to the mobile clouds that you want to use.
  • Noted the IP address of the remote agent computer if the mobile cloud is connected to the remote computer.

About this task

To extend the test coverage you can add devices from multiple mobile clouds by creating groups in the AFT Suite. The AFT Suite, then, can be used to run the tests simultaneously on devices connected to multiple mobile clouds.

Procedure

  1. Open the UI Test perspective in HCL OneTest UI, if it is not already open.
  2. Go to File > New > Other

    The Select a wizard dialog is displayed.

  3. Perform the following actions in the Select a wizard dialog:
    1. Select the XML File option in the XML folder.
    2. Click Next.

      The projects that contain the tests are displayed.

    3. Select the project where you want to save the XML file.
    4. Enter a name for the XML file in the File name field.
    5. Click Next.
    6. Select the Create XML file from an XML template option.
    7. Click Finish.
      An XML document is opened for editing in the Source view tab.
      Note: Open the Source view tab if the Design view tab is displayed.
      A sample of the syntax or structure of the XML is as follows:
      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <inits id="<any_alphanumeric_value>" type="com.ibm.rational.test.ft.aftSuite">
       <group>
        <tests>
           <test path="<path_to_mobile_test_1>"/>
           <test path="<path_to_mobile_test_2>"/>
        </tests>
        <devices>
           <device id="<name of the device 1>”/>
        </devices>
        <locations>
           <location host="<location_where_test_is_run>"/>
        </locations>
       </group>
      </inits>
      
    Refer to the following table to know the variables for the attributes mentioned in the XML sample:
    Element Attribute Variable Description
    inits id <any_alphanumeric_value> Specifies that you can enter any alpha-numeric value that helps to identify the XML file.
    test path <path_to_mobile_test_1><path_to_mobile_test_2><path_to_mobile_test_3> Specifies the path to the mobile test in your project.
    Note: You can find the path by right-clicking the test, and then go to Properties > Resource.
    device id <name_of_the_device_1> Specifies the name or id of the device that is connected to the device cloud.
    location host <location_where_test_is_run> Specifies the location as the computer that runs the test. The host can be the computer that is running HCL OneTest UI or the remote agent computer.
  4. Create the following elements in the XML document:
    Note: You can copy the sample syntax and then edit the values in the UI, or you can create the elements in the XML in the UI.
    1. <group>

      The start and end tags are automatically inserted.

      You must create a separate group for each mobile clouds. Each group must contain the elements that are mentioned in in the following steps.

    2. Create <tests> within the <group> tag.
    3. Create <test> within the <tests> tag.
    4. Add the attribute path to the <test> as follows:
      <test path="">
      Note: All values that you enter for the attributes must be enclosed within a double quotation mark.
    5. Add additional rows for each mobile test.
    6. Create <devices> within the <group> tag.
    7. Create <device> within the <devices> tag.
    8. Add the attribute id as follows:
      <device id=""></device>
    9. Create <locations> within the <group> tag.
    10. Create <location> within the <locations> tag.
    11. Add the attribute host as follows:
      <location host=""></location>
  5. Refer to the following table for the values of the attributes that you can use in the XML file:
    Attribute Example of a value Explanation
    test path MyProject\test_1 The path in the workspace that contains the project with the test. You can find the path of the test from the Test Navigator by right-clicking the test, and then go to Properties > Resource.
    Device id BitBar Bitbar:Google Pixel 2 The name of the Android device is Google Pixel 2 that is connected to the BitBar Cloud.
    Bitbar:Apple iPhone 6s Plus A1687 12.0.1 The name of the iOS device is Bitbar : Apple iPhone 6s Plus A1687 12.0.1 that is connected to the BitBar Cloud.
    pCloudy pcloudy:Pixel_2_API_30 The name of the Android device is Pixel 2 API 30 that is connected to the pCloudy Cloud.
    pCloudy:Apple_iPhone8plus_Ios_12.2.0_9db66 The name of the iOS device is Apple_iPhone8plus_Ios_12.2.0_9db66 that is connected to the pCloudy Cloud.
    Perfecto Perfecto:8D3E35CF16D8D827E4827ABBCD0E582E2761CADA The name of the Android device is 8D3E35CF16D8D827E4827ABBCD0E582E2761CADA that is connected to the Perfecto Cloud.
    Perfecto:R48904TNSAZ The name of the iOS device is Perfecto : R48904TNSAZ that is connected to the Perfecto Cloud.
    location host localhost The host is localhost if the device cloud is connected to the computer that runs HCL OneTest UI.
    1.20.30.40 The host is the IP address of the remote agent computer, if the device cloud is connected to the remote agent computer.
  6. Enter the values for the attributes for your tests, device, and location in the XML file.
  7. Save the XML file.

Results

You have created an AFT Suite for mobile tests, which you can use to run the mobile tests on devices that are connected to multiple mobile clouds.

What to do next

You can run the AFT suite on mobile devices connected to multiple mobile clouds. See Running mobile tests as an AFT Suite on multiple mobile clouds.