This is a Java-based test automation project using Selenium WebDriver for web testing and Appium for Android mobile testing.
test/
├── pom.xml # Maven build file
├── src/
│ ├── main/
│ │ └── java/src/
│ │ ├── Web.java # Web test helper methods
│ │ ├── Android.java # Android test helper methods
│ │ ├── SelectorLoader.java # Loads selectors from XML
│ │ ├── Helper.java # Shared helper methods (e.g., Login)
│ │ └── selector.xml # XML file with web & mobile selectors
│ └── test/
│ └── java/
│ ├── WebTest.java # Web tests (CURA Healthcare Service)
│ └── AndroidTest.java # Android tests (Erafone app)
- Web Testing: Uses Selenium WebDriver and ChromeDriver to test CURA Healthcare Service
- Android Testing: Uses Appium with UiAutomator2 to test Erafone Android app
- Selector Management: Uses XML to store test selectors (keeps test code clean)
- Test Framework: JUnit 5 for test structure and AssertJ for assertions
To run this project, you need to have installed:
- Java 11 or higher
- Maven 3.6+
- Chrome Browser (for web tests)
- ChromeDriver matching your Chrome version (or use WebDriverManager)
- Appium Server (for Android tests):
npm install -g appium
- UiAutomator2 Driver:
appium driver install uiautomator2
- Android Studio & Android SDK (for Android tests)
- Physical Android device or emulator connected via USB debugging
- Selenium Java: 4.46.0
- Appium Java Client: 9.2.3
- JUnit Jupiter: 5.10.2
- AssertJ: 3.25.3
cd /path/to/your/workspace
git clone <your-repository-url>
cd testCurrently, the Appium Java Client 9.2.3 is incompatible with Selenium 4.46.0. To fix this, you can:
- Downgrade Selenium Java to a version between 4.19.0 - 4.27.0 in pom.xml, or
- Upgrade Appium Java Client to 10.x (which supports newer Selenium versions)
mvn clean testmvn clean test -Dtest=WebTestFirst start the Appium server in one terminal:
appiumThen in another terminal:
mvn clean test -Dtest=AndroidTesttestLoginWithInvalidData: Tests login with wrong credentialstestLoginWithValidData: Tests successful logintestMakeAppointmentWithoutInputMandatoryField: Tests booking without required infotestMakeAppointmentWithInputMandatoryField: Tests successful appointment booking
loginWithInvalidData: Tests login with wrong credentialsloginWithValidData: Tests successful login and profile check
Edit selector.xml to add new web or mobile element selectors.
Edit test files like WebTest.java or AndroidTest.java to change test inputs.