Repository navigation
MOSIP-43667:ARC UI automation add testcases and move to develop branch #640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
a0bfe00
MOSIP-42652: ARC UI automation
damodarguru 08a28ea
MOSIP-42652: ARC UI automation
damodarguru 721b9fc
MOSIP-42652: ARC UI automation
damodarguru 3a12146
MOSIP-42652: ARC UI automation
damodarguru 59b0551
MOSIP-42652: ARC UI automation
damodarguru 13a5216
MOSIP-42652: ARC UI automation
damodarguru d491e34
MOSIP-42652: ARC UI automation
damodarguru 0ab2c46
MOSIP-42652: ARC UI automation
damodarguru e8fc791
MOSIP-42652: ARC UI automation
damodarguru 33c2c6d
MOSIP-42652: ARC UI automation
damodarguru 59533f0
MOSIP-42652: ARC UI automation
damodarguru 226ead9
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru 16859d2
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru 6f6439c
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru 62556f7
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru b1e9686
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru ffba7b1
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru 9448a75
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru c23865d
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru 1724c69
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru 6ca07a5
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru a6a0116
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru ceb9e9e
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru e84a07b
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,54 +1,196 @@ | ||
| # Reg-Client Automation | ||
|
|
||
| # Reg-Client Automation - Mobile Automation Framework using Appium | ||
| Mobile Automation Framework for Android using **Appium & TestNG**. | ||
|
|
||
| ## Overview | ||
| Reg-Client Automation is a mobile automation framework designed for Android platforms. It automates both positive and negative scenarios to ensure comprehensive testing of mobile applications. | ||
| --- | ||
|
|
||
| ## Installation | ||
| To set up Appium for use with this framework, please follow the installation instructions provided in the [Appium documentation](https://appium.io/docs/en/about-appium/intro/). | ||
| ## Introduction | ||
|
|
||
| Reg-Client Automation is a mobile automation framework for Android platforms. | ||
| It automates **positive and negative scenarios** and supports both **emulators and real devices**. | ||
|
|
||
| --- | ||
|
|
||
| ## Build | ||
|
|
||
| 1. **Build the JAR file**: | ||
| ```bash | ||
| mvn clean package -DskipTests=true | ||
| ``` | ||
|
|
||
| 2. The generated JAR file (`uitest-regclient-1.0.0.jar`) will be located in the `target` directory. | ||
| 3. **For running tests on a device**: Use the JAR file with dependencies (`uitest-regclient-1.0.0.jar`). | ||
|
|
||
| ## Configurations | ||
| 3. **For running tests on a device**: | ||
| Use the shaded JAR with dependencies: | ||
| ``` | ||
| uitest-regclient-1.0.0.jar | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Install the following before setup: | ||
|
|
||
| ### General Configurations (for both JAR and IDE runs) | ||
| 1. **Environment Settings**: | ||
| - Update `resources/Config/kernal.properties` to modify environment-specific settings. | ||
| * Java JDK **11 or above** | ||
| * Maven | ||
| * Android Studio (for emulator) | ||
| * Node.js (for Appium) | ||
| * ADB (comes with Android SDK) | ||
| * Eclipse IDE or IntelliJ IDEA (optional) | ||
|
|
||
| 2. **Test Data**: | ||
| - Update the following keys in `resources/testdata.json`: | ||
| - `uin` | ||
| - `language` | ||
| - `rid` | ||
| --- | ||
|
|
||
| ## Appium Setup | ||
|
|
||
| 1. Install Node.js: | ||
| https://nodejs.org (choose Windows 64-bit installer) | ||
| Ensure **Add to PATH** is selected. | ||
|
|
||
| 2. Install Appium server globally: | ||
| ```bash | ||
| npm install -g appium | ||
| appium -v | ||
| ``` | ||
|
|
||
| 3. Start Appium server: | ||
| ```bash | ||
| appium | ||
| ``` | ||
|
|
||
| 3. **General Configurations**: | ||
| - Update `resources/config.properties` with the following values: | ||
| - `nodePath`: Path to the Node.js executable. | ||
| - `appiumServerExecutable`: Path to the Appium server executable. | ||
| 4. (Optional) Install **Appium Desktop (GUI)** and start the server from the app. | ||
|
|
||
| 4. **Desired Capabilities**: | ||
| - Update `resources/DesiredCapabilies.json` with the following keys: | ||
| - `appium:udid`: Unique Device Identifier for the target device. | ||
| - `appium:app`: Path to the application APK. | ||
| --- | ||
|
|
||
| ## Execution | ||
| ## Emulator Setup | ||
|
|
||
| ### Running Tests with JAR | ||
| 1. **Run the JAR file**: | ||
| - Execute the `run_regclient.bat` batch file, which will trigger the test execution. | ||
| 1. Open **Android Studio → Tools → Device Manager → Create Device** | ||
| 2. Select a device (e.g., Pixel 5) and API level (30/31) | ||
| 3. Download system image and finish setup | ||
| 4. Start emulator from Device Manager | ||
|
|
||
| ### Running Tests in IDE | ||
| 1. **Run Configuration**: | ||
| - Set `regclient.utils.TestRunner` as the main class in your IDE run configuration. | ||
|
|
||
| 2. **Resource File Locations**: | ||
| - `kernal.properties` and `testdata.json` are located under `src/main/resources` for IDE runs, as opposed to `resources` in the JAR run. | ||
| --- | ||
|
|
||
| ## Mock MDS Setup | ||
|
|
||
| 1. Place `mockmds.apk` in your platform-tools folder: | ||
| ``` | ||
| C:\Users\<username>\AppData\Local\Android\Sdk\platform-tools | ||
| ``` | ||
|
|
||
| 2. Verify emulator/device: | ||
| ```bash | ||
| adb devices | ||
| ``` | ||
|
|
||
| 3. Install APK: | ||
| ```bash | ||
| adb install mockmds.apk | ||
| ``` | ||
|
|
||
| 4. Verify installation: | ||
| ```bash | ||
| adb shell pm list packages | findstr mosip | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## WireGuard Setup | ||
|
|
||
| 1. Download WireGuard APK (official site or F-Droid) | ||
| 2. Place it in `platform-tools` | ||
| 3. Install: | ||
| ```bash | ||
| adb install com.wireguard.android-1.0.20250531.apk | ||
| ``` | ||
|
|
||
| 4. Launch WireGuard and activate the tunnel if required | ||
|
|
||
| --- | ||
|
|
||
| ## Clone & Setup Automation Framework | ||
|
|
||
| Fork the repository (**branch: develop**) and clone locally: | ||
|
|
||
| ```bash | ||
| cd ~/Desktop | ||
| mkdir arc && cd arc | ||
| git clone https://github.com/mosip/android-registration-client.git | ||
| ``` | ||
|
|
||
| Import the project into **Eclipse / IntelliJ** if needed. | ||
|
|
||
| --- | ||
|
|
||
| ## Run Automation | ||
|
|
||
| ### From IDE | ||
|
|
||
| * Create a **Run Configuration** | ||
| * **Main Class**: `regclient.utils.TestRunner` | ||
| * Run the configuration | ||
|
|
||
| --- | ||
|
|
||
| ### From Packaged JAR | ||
|
|
||
| ```bash | ||
| cd android-registration-client/ui-test/target | ||
| java -jar uitest-regclient-1.0.0.jar | ||
| ``` | ||
|
|
||
| Alternatively, run the provided batch script (if present): | ||
| ``` | ||
| run_regclient.bat | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Important Configuration Files | ||
|
|
||
| Update these files before execution: | ||
|
|
||
| * `resources/config/kernal.properties` — Environment details | ||
| * `resources/testdata.json` — Test data (uin, language, rid, camera id) | ||
| * `resources/config.properties` — `nodePath`, `appiumServerExecutable` | ||
| * `resources/DesiredCapabilies.json` — `udid`, app path | ||
| * `camara.java` — Update camera & retake button coordinates | ||
|
|
||
| 📌 Any runtime properties (e.g. `bioValue.properties`) must be placed under: | ||
| ``` | ||
| src/main/resources/config | ||
| ``` | ||
| (Maven will copy them to `target/classes/config`) | ||
|
|
||
| --- | ||
|
|
||
| ## Reports | ||
| - After test execution, test reports will be available in the `test-output/emailableReports` directory. | ||
|
|
||
| After execution, reports are generated at: | ||
|
|
||
| ``` | ||
| test-output/emailableReports | ||
| ``` | ||
|
|
||
| Reports include: | ||
| * Test summary | ||
| * Pass / Fail ratio | ||
| * Detailed execution logs | ||
|
|
||
| --- | ||
|
|
||
| ## Troubleshooting (Quick) | ||
|
|
||
| * **JVM / native memory errors** | ||
| Increase Windows pagefile or reduce JVM `-Xmx` | ||
|
|
||
| * **SLF4J multiple bindings warning** | ||
| Ensure only **one SLF4J binding** exists | ||
| (recommended: `log4j-slf4j2-impl`) | ||
|
|
||
| * **Missing resource files** | ||
| Ensure all `.properties` files are under `src/main/resources` | ||
|
|
||
| * **Class name mismatch** | ||
| Java class names are **case-sensitive** — ensure TestNG XML matches compiled class names | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.