Document toolboxDocument toolbox

A new version of Qualitia Automation Studio for Web and Mobile 7.2.x is now available. We highly recommend you upgrade. Find more details here.

Automating your first Test Case with Qualitia Automation Studio (Android Native App)

Once you connect your device with the computer, you can start creating your first test case with Qualitia for Mobile.

Follow the below mentioned steps to create and execute your first test case with Qualitia for Mobile:

  1. Log on to Qualitia Test Automation Tool.
  2. Connect your Android device with the Windows computer which is set for test executions.
  3. On your Windows computer, Appium Desktop.
  4. On the File menu, click New Session Window.
    Ensure Automatic Server option is selected on the top panel.
  5. Add following desired capabilities.
    1. platformName: Android
    2. udid: ZASBAMSUX (open command prompt and execute adb devices -l command to get UDID.)
    3. newCommandTimeout: Required. Enter 1800. So session will not be closed during object identification.
    4. app: Enter absolute path of the .apk file where device is connected.
      or
      appPackage: com.android.calculator2
      appActivity: com.android.calculator2.calculator
  6. Click Start Session.
    This will display the landing page of the AUT (here calculator) in Appium Inspector.
    1. Click the object "Number 2" in calculator.
    2. From the Selected Element section of Appium Inspector, copy the value displayed against class field.
    3. Go to Qualitia > Develop > Objects and click the New button.
    4. Select Object Type as Mobile Native.
    5. Enter Object Name as Digit 2.
    6. Enter Description.
    7. Enter the value copied from the class field of Appium inspector in the Search Class field.
    8. This will automatically select the Class of the object being added.
    9. In the Android Locator Type, select ID.
    10. From the Selected Element section of Appium Inspector, copy the value displayed against id field.
    11. Enter the value copied from the id field of Appium inspector in the Android Locator Type field.
    12. Click OK.
      The object is now created. Same way, create other objects required for test that include Digit 5Multiplication and Equal to sign and result box.
  7. Navigate to the Task window in Qualitia and create new Task.
  8. In the Step section, click the Add button to add a new step.
  9. In the Actions column, select Mobile.OpenApp and add parameter details; Android Package and Android Activity.

    The Android Package and Android Activity details are to be obtained from the application developers. You can also get it using command line arguments. For more details, please refer to Finding Package Name / Activity Name and Bundle ID from the Frequently Asked Questions (FAQs) section.

  10. Add new step.
  11. In the Object column, select Digit 2.
  12. In the Actions column, select Click.
  13. Add new step.
  14. In the Object column, select multiplication sign.
  15. In the Actions column, select Click.
  16. Add new step.
  17. In the Object column, select Digit 5.
  18. In the Actions column, select Click.
  19. Add new step.
  20. In the Object column, select Equal to.
  21. In the Actions column, select Click.
  22. Add new step.
  23. In the Object column, select Result Box.
  24. In the Actions column, select StorePropertyValue
    • In the first Parameter section, add the variable name under which the property value will be stored. In current test case, add "myresult".
    • In the second Parameter section, add the property type to store from the selected object in double inverted comma. In current test case, add "text".
    This action will save the result to be compared with the expected result.
  25. Add a new step and in the Actions column, select CompareString.
    • In the first Parameter section, replace the firstString with variable name provided in the previous action. In current test case, add "{myresult}".
    • In the second Parameter section, add the property value with which the stored value is to be compared. In current test case, add "10".
    This action will compare the saved result with the expected result provided by users.
    Your task is now complete and you can import this task to any Test case.
  26. Navigate to the Test Cases window and create new Scenario and Test Case.
  27. To add tasks in test case, click the Import button.
  28. Search and select the task to import in Test case and click OK.
  29. Click the Save button to save the details.
  30. Start Appium Server
  31. Click the Run button and ensure every step is being executed in the Physical device connected with your computer correctly.
  32. To add this test case to Suite, navigate to the Execute window > create new suite or click the existing suite > Search and select test case to add and click OK.
  33. After successful suite creation, you can:
    • Save the marked test cases in XML clicking Save As XML button.
    • Run all the test cases marked in the list from this suite clicking Run Now button.
    • Schedule the test case execution on desired time clicking the Schedule button.


Test Case Specifications

Platform

Android

Application Type

Native

Operating System

Windows

Application Under Test

Calculator

Execution Device

Physical Android Phone

Object Identification ToolAppium Inspector

Test Summary

Perform a simple calculation using calculator and then compare the results with the expected results.

Not finding what you need?