This project is an automated UI test suite written in Java using Appium, JUnit 5, and Maven. It tests basic arithmetic operations on the Samsung Calculator app pre-installed on Samsung Android devices.
- 🚀 Appium setup using UiAutomator2
- ✅ Tests for addition, subtraction, multiplication, division, and error handling
- 🧪 Reusable utility methods for key actions
- 🔧 Configuration via environment variables
Ensure the following tools are installed and configured:
- Java 11+
- Maven
- Appium Server
- Node.js
- Android SDK + Emulator
- Samsung Calculator app installed on a real or virtual Samsung device (version 12.3.05.8 or higher)
Clone the repository:
git clone https://github.com/Artenes/appium-calculator-tests.git
cd appium-calculator-testsInstall dependencies:
mvn clean installBefore running the tests, set these environment variables:
| Variable Name | Description | Example |
|---|---|---|
CALC_TEST_APPIUM_SERVER_URL |
Appium server URL | http://127.0.0.1:4723/ |
export CALC_TEST_APPIUM_SERVER_URL="http://127.0.0.1:4723/"set CALC_TEST_APPIUM_SERVER_URL=http://127.0.0.1:4723/Start your Appium server in a separate terminal:
appiumThen run the tests with Maven:
mvn testsrc/
└── test/
└── java/
└── org/
└── example/
└── MainTest.java
testAddition()– Verifies 2 + 2 = 4testSubtraction()– Verifies 8 - 3 = 5testMultiplication()– Verifies 6 × 7 = 42testDivision()– Verifies 8 ÷ 2 = 4testDivisionByZero()– Tests division by 0 behaviortestClearButton()– Tests the clear button resets input
- Only works on Samsung devices that have the stock Calculator app (
com.sec.android.app.popupcalculator) - Tests use implicit waits for basic synchronization
- Tests can be extended to include scientific functions or history features if available
Artenes Junior Gomes Nogueira
- GitHub: https://github.com/Artenes
- LinkedIn: https://linkedin.com/in/artenes
This project is open-source and available under the MIT License.