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.