Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

bahadirh/testing-platform-appium-client

Repository files navigation

Test Client for Testing Platform

Before running that test client, please make sure a RabbitMQ instance for API-test client communication and a MinIO instance to be used as file storage are already started and accessible as well.

Below are some simple commands to run RabbitMQ and MinIO on Docker, locally.

# Run RabbitMQ on port 5672 with management interface on port 15672
docker run -d \
    --name rabbitmq -p 5672:5672 -p 15672:15672 \
    -e RABBITMQ_DEFAULT_VHOST="my-virtual-host" \
    -e RABBITMQ_DEFAULT_USER="user" \
    -e RABBITMQ_DEFAULT_PASS="pass" \
    rabbitmq:management

# Run MinIO on port 9000
docker run -d \
    --name minio -p 9000:9000 \
    -e MINIO_ACCESS_KEY="my-access-key" \
    -e MINIO_SECRET_KEY="my-secret-key" \
    minio/minio minio server "/data"

The client also requires a working Appium installation. appium-doctor package can be used to detect any missing component.

yarn global add appium-doctor
appium-doctor --android
appium-doctor --ios

1. Pull the repository

git clone https://gitlab.com/cmpe492/appium-client.git && cd appium-client

Run the commands below inside appium-client folder on terminal.

2. Check Node version and Yarn installation

The app requires Node version 12 or newer.

node -v
yarn -v

Sample output:

v12.18.0
1.22.4

3. Install dependencies

yarn install

4. Set environment variables and emulators

The app requires several environment variables to be set before running, otherwise it throws error. These environment variables are mainly related to the other components required that are mentioned at the first section in this document: RabbitMQ and MinIO. Given below is a sample .env file.

rabbitMQURL="rabbitmq-subdomain.mydomain.tld"   # RabbitMQ instance URL
rabbitMQVHost="/my-virtual-host"                # Virtual host that should be created beforehand
rabbitMQUser="user"                             # A user that has access to given virtual host
rabbitMQPass="pass"                             # Password of the user given above

minioURL="minio-subdomain.mydomain.tld" # MinIO instance URL
minioAccessKey="my-access-key"          # MinIO access key
minioSecretKey="my-secret-key"          # MinIO access secret key

The client reads the names/numbers of emulators/simulators of Android/IOS instances from machines.yaml file within the root folder of the repository, appium-client. A sample file is provided, named machines-sample.yaml. Update the file with emulators/simulators in the host machine and rename it to machines.yaml, before starting the client.

How to start development server locally

The command starts debugger websocket on port 9229, so make sure that port isn't used.

yarn dev

How to start the API for production

yarn start

Contact info

[email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published