Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a0bfe00
MOSIP-42652: ARC UI automation
damodarguru Nov 14, 2025
08a28ea
MOSIP-42652: ARC UI automation
damodarguru Nov 14, 2025
721b9fc
MOSIP-42652: ARC UI automation
damodarguru Nov 14, 2025
3a12146
MOSIP-42652: ARC UI automation
damodarguru Nov 14, 2025
59b0551
MOSIP-42652: ARC UI automation
damodarguru Nov 14, 2025
13a5216
MOSIP-42652: ARC UI automation
damodarguru Nov 16, 2025
d491e34
MOSIP-42652: ARC UI automation
damodarguru Nov 16, 2025
0ab2c46
MOSIP-42652: ARC UI automation
damodarguru Nov 16, 2025
e8fc791
MOSIP-42652: ARC UI automation
damodarguru Nov 17, 2025
33c2c6d
MOSIP-42652: ARC UI automation
damodarguru Nov 17, 2025
59533f0
MOSIP-42652: ARC UI automation
damodarguru Nov 17, 2025
226ead9
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru Dec 1, 2025
16859d2
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru Dec 1, 2025
6f6439c
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru Dec 1, 2025
62556f7
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru Dec 2, 2025
b1e9686
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru Dec 3, 2025
ffba7b1
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru Dec 3, 2025
9448a75
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru Dec 4, 2025
c23865d
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru Dec 10, 2025
1724c69
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru Dec 10, 2025
6ca07a5
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru Dec 10, 2025
a6a0116
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru Dec 19, 2025
ceb9e9e
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru Dec 19, 2025
e84a07b
MOSIP-43667:ARC UI automation add testcases and move to develop branch
damodarguru Dec 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
210 changes: 176 additions & 34 deletions ui-test/README.md
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
* `camera.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

Loading