Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 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
188 changes: 148 additions & 40 deletions ui-test/README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,162 @@
# 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

## Build
1. **Build the JAR file**:
```bash
mvn clean package -DskipTests=true
```
2. The generated JAR file (`uitest-regclient-0.0.1.jar`) will be located in the `target` directory.
3. **For running tests on a device**: Use the JAR file with dependencies (`uitest-regclient-0.0.1.jar`).
Reg-Client Automation is a mobile automation framework for Android platforms. It automates positive and negative scenarios and supports both emulators and real devices.

## Configurations
## Prerequisites

### General Configurations (for both JAR and IDE runs)
1. **Environment Settings**:
- Update `resources/Config/kernal.properties` to modify environment-specific settings.
Install the following before setup:

2. **Test Data**:
- Update the following keys in `resources/testdata.json`:
- `uin`
- `language`
- `rid`
* 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)

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. **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.
## Appium Setup

## Execution
1. Install Node.js: [https://nodejs.org](https://nodejs.org) (choose Windows 64-bit installer). Ensure **Add to PATH** is selected.
2. Install Appium server globally:

### Running Tests with JAR
1. **Run the JAR file**:
- Execute the `run_regclient.bat` batch file, which will trigger the test execution.
```bash
npm install -g appium
appium -v # verify
```

### 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.
3. Start Appium server:

```bash
appium
```

4. (Optional) Install Appium Desktop (GUI) and start server from the app.

---

## Emulator Setup

1. Open Android Studio → **Tools > Device Manager > Create Device**.
2. Select a device (e.g., Pixel 5) and an API level (30/31).
3. Download the system image and finish setup.
4. Start emulator from Device Manager.

---

## Mock MDS Setup

1. Place `mockmds.apk` in your platform-tools folder, e.g.:

```
C:\Users\<username>\AppData\Local\Android\Sdk\platform-tools
```

2. Verify emulator is running:

```bash
adb devices
```

3. Install the 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) and place it in platform-tools.
2. Install:

```bash
adb install com.wireguard.android-1.0.20250531.apk
```

3. 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 your IDE (Eclipse/IntelliJ) if needed.

---

## Run Automation

### From IDE

* Create a Run Configuration with **Main Class**: `regclient.utils.TestRunner` and run.

### From packaged JAR

Build and run the JAR:

```bash
cd android-registration-client/ui-test/target
java -jar uitest-regclient-0.0.1.jar
```

Alternatively run the provided batch script: `run_regclient.bat` (if present).

---

## Important Configuration Files

Update these files before running tests:

* `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 cordinates

Place any runtime properties such as `bioValue.properties` under `src/main/resources/config` (or ensure your build copies 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 logs

---

## Troubleshooting (quick)

* **Native memory / JVM errors**: Increase Windows pagefile or reduce JVM `-Xmx` used by Eclipse/installer.
* **SLF4J multiple bindings**: Ensure only one SLF4J binding (preferably Log4j2 `log4j-slf4j2-impl`) is on classpath and exclude others.
* **Missing resource files**: Put required `.properties` under `src/main/resources` so Maven copies them to `target/classes`.
* **Class name mismatch**: Java class names and filenames are case-sensitive; ensure TestNG XML references match compiled class names.
Loading