Mobile Testing
14 Best Mobile Testing Tools for Android & iOS App [Free/Paid]
Mobile Testing Tools help you automate testing of your Android and iOS Apps. These Mobile...
Calabash is an open source Acceptance Testing framework that allows you to write and execute tests for iOS and Android Apps.
It's an Automated User Interface Framework that allows tests to be written in Ruby using Cucumber.
Calabash works by enabling automatic UI interactions within a Mobile application such as pressing buttons, inputting text, validating responses, etc. It can be configured to run on different Android and iOS devices, which provides real-time feedback and validations. In this tutorial, we will learn -
| Advantages | Disadvantages |
| It helps to increase throughput/ productivity. | Proficiency is required to write the automation test scripts. |
| Improved quality or increased predictability of quality | Debugging the test script is a major issue. |
| Improved robustness (consistency) of processes or product. | Test maintenance is costly in case of playback methods. |
| Increased consistency of output and reduce labor costs and expenses | Maintenance of test data files is difficult if the test script tests more screens |
Part I) Install Java JDK – Refer this guide - /install-java.html
Part II) Download and install Ruby.
Step 1) Download Ruby from the URL http://rubyinstaller.org/downloads
Step 2) Open the exe, follow the instructions on the screen. Once install is complete you will see the following screen. Click Finish.
Start Command Prompt with Ruby on Windows 10 & type below Command.
ruby –v
Part III) Download and install Android
Step 1) Download Android Studio at http://developer.android.com/sdk/index.html
Step 2) Open the exe, follow the on-screen instructions and complete installation. Click the finish button once done
Part IV) Install Calabash Android
Step 1) In the console type install calabash-android. The install will start and will take some time to complete
Step 2) Once installation is done Type calabash-android version
Open the "calabash-android-0.9.0" folder. It resides at path C:\Ruby23\lib\ruby\gems\2.3.0\gems\calabash-android-0.9.0. The folder names will change in synch with the ruby/ calabash version you install on your machine.
Open the feature skeleton folder. Look out for this basic framework.
Resign & Build the app
Attach the device to the system /Open the emulator
Check device attached. Type command
adb devices
Attached devices list should be displayed.
How to Find the Element Locator
calabash android console "APK Path" start_test_server_in_background
query "*"
This will display all the element locators on the current screen.
Creating New Scripts
Open the feature file and following lines
Feature: Login feature
Scenario: As a valid user I can log into my app
When I press "Login"
And I enter my username
And I enter my password
Then I see "Welcome to coolest app ever"Open the Step Definition file & Define the method into *.rb file.
Given /^I am on the login windows$/ do
wait_for(:timeout =>100) { element_exists("* id:'loginInput;")}
check_element_exists("* id:'loginInput;")
end
Execute the test project
To execute the test project, use command below
calabash-android run "APK Path" "feature file Path" – tags "tag name"
Summary
Mobile Testing Tools help you automate testing of your Android and iOS Apps. These Mobile...
A frequent question from our learner's is How to test Mobile Apps? In this tutorial, we provide...
Apache Maven is a Java-based project management tool. It can provide a multitasking framework for...
What is Game Testing? Game Testing is a software testing process for testing video games for...
What is ADB? Using any real device for mobile automation Testing is always been a challenge for...
For any mobile app, performance is very critical. If your Mobile App does not perform well, the...