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:
Connect your Android device with the Windows computer which is set for test executions.
Launch Mobile Object Spy and launch Calculator to add objects from it.
Launch Mobile Object Spy, select device to use for object spy and launch calculator in it.
Enable object spy mode clicking the play () icon.
Hover over object you want to add and Object spy will highlight the object.
Click the highlighted object to add it in the repository. Object will then appear in the right pane in the Object Repository section.
Update the object properties like name, locator type/value, object class, if required.
Click the pause () button to exit from the object spy mode or click the button to end the session.
Add all the required objects one-by-one. For this test case we will need Digit 2,Digit 5, Multiplication sign,Equal tosign, and resultbox
Launch Qualitia Automation Studio and select the desired project. In the Develop > Objects section, you will find all the objects that we have added using mobile object spy earlier.
Navigate to the Task window in Qualitia and create new Task.
In the Step section, click the Add button to add a new step.
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.
Add new step.
In the Object column, select Digit 2.
In the Actions column, select Click.
Add new step.
In the Object column, select multiplication sign.
In the Actions column, select Click.
Add new step.
In the Object column, select Digit 5.
In the Actions column, select Click.
Add new step.
In the Object column, select Equal to.
In the Actions column, select Click.
Add new step.
In the Object column, select Result Box.
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.
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.
Navigate to the Test Cases window and create new Scenario and Test Case.
To add tasks in test case, click the Import button.
Search and select the task to import in Test case and click OK.
Click the Save button to save the details.
Go to Settings>System Execution Profile Settings.
On the Mobile tab, enter Appium Server and Port details and select Platform.
Enter UDID of the physical device which is connected to the machine. For more information about this, please refer to theHow to Identify UDID inFrequently Asked Questions (FAQs).
Click OK to save the details.
Start Appium Server.
From the Develop section, click Dry Run and ensure every step is being executed in the connected mobile device. An execution report will be displayed once the execution is completed.
Once the test case is ready, you can add it to different suites for execution or execute it using offline package configuring environment based on the test case requirements.
Test Case Specifications
Platform
Android
Application Type
Native
Operating System
Windows
Application Under Test
Calculator
Execution Device
Physical Android Phone
Object Identification Tool
Appium Inspector
Test Summary
Perform a simple calculation using calculator and then compare the results with the expected results.
JavaScript errors detected
Please note, these errors can depend on your browser setup.
If this problem persists, please contact our support.