A basic calculator app is automated by testing its basic functionalites using Appium on an emulated device powered by Android Studio.
Here the following tasks are done:
- A basic Calculator app extracted from Calculator App is automated by extracting its apk.
- Basic operations like add,subtract,multiplication and divide functionality is checked whether it is giving correct result or not using Appium.
- Tool: Selenium Webdriver
- IDE: Intellij, Android Studio
- Build tool: Gradle
- Language: Java
- Test_Runner: Appium
- Sum of 2 numbers (9+5=14)
- Subtraction of 2 numbers (8-3=5)
- multiplied of Result of Sum and Subtraction (14*5=70)
- Divided the result of multiplication with 10 (70/10=7)
- Solved this series (100+200-100*2/5)
- Install Android Studio latest version
- Install Appium 1.17.1
- Install jdk 8 or any LTS version
- Clone this project
- Open Android Studio and Open the APK file:
- Set required configuration
- Hit this command in cmd for checking the connectivity with emulator :
adb devices
- Open Appium Server with following command:
appium -p 4723
- Open Appium Inspector
- Set desired capabilites in json format:
{
"appium:deviceName": "emulator",
"appium:uuid": "emulator-5554",
"platformName": "Android",
"appium:platformVersion": "11",
"appium:appPackage": "com.google.android.calculator",
"appium:appActivity": "com.android.calculator2.Calculator",
"appium:app": "D:\\RTSDET\\APK\\calculator.apk"
}
-
Open Intellij Idea
-
Hit the following command into the terminal:
gradle clean test
-
The following report is generated:
- After automation to view allure report , give the following commands:
allure generate allure-results --clean -o allure-report
allure serve allure-results
Here is the Allure report overview: