Skip to content

The goals of the project are to create an application from scratch and create a test automation framework for the application using modern, relevant tools for writing automated tests.

Notifications You must be signed in to change notification settings

RapDog64/reindeer-traveler

Repository files navigation

Rangiffler

Ladies and Gentlemen allow me to introduce you Rangiffler. Rangiffler - comes from the name of the reindeer. This name was chosen for this project because it is all about travel and the reindeer hold the record among deer for the distance traveled on land. So, travel and be like Rangifler!

Technologies that are used in the project

Backend

Frontend

Testing tools

Common tools for building and running the project

Architecture of the application

The Rangiffler application has been built based on microservices architecture which contains the following service

  • Auth - responsible for authentication and authorization
  • Gateway - the proxy service that the frontend uses to communicate with the backend services
  • User data - responsible for providing user data and users' friends information
  • Photo - responsible for providing user photo information
  • Geo - contains the countries
  • Client - front-end interface of the application

Application Schema

The list of the components and ports:

Component Port
Database 5432
Auth 9000
User data 8089
Gateway 8080
Photo 8086
Geo 8088
Frontend 3001

Preconditions for working with the Rangiffler project

1. Pull the postgres container version 15.1

docker pull postgres:15.1

2. Create volume for saving data from the database in the docker

docker volume create pgdata

3. Run the database

docker run --name rangiffler-all -p 5432:5432 -e POSTGRES_PASSWORD=secret -v pgdata:/var/lib/postgresql/data -d postgres:15.1

4. Install PgAdmin 4 to work with Postgres (Optional step)

5. Connect to the database (host: localhost, port: 5432, user: postgres, password: secret, database name: postgres) using PgAdmin and create empty db for the microservices.

create database "rangiffler-userdata" with owner postgres;
create database "rangiffler-geo" with owner postgres;
create database "rangiffler-photo" with owner postgres;
create database "rangiffler-auth" with owner postgres;

6. Install NPM manager for building the front-end part

Documentation. Recommended version Node.js - 18.13.0 (LTS)

Run Ranigffler locally in your IDE

1. Change directory to rangiffler-client

MacBook-Pro rangiffler % cd rangiffler-client

2. Run front end

MacBook-Pro rangiffler-client % npm i
MacBook-Pro rangiffler-client % npm run start

3. Add run configuration for all the back-end services rangiffler-* - Active profiles 'local'

Open the Run menu -> Edit Configurations -> choose main class -> set Active profiles: local.

Example can be found on stackoverflow

4. Run the Rangiffler-auth service using gradle or the Run command in your IDE

  • Run the auth service
MacBook-Pro rangiffler % cd rangiffler-auth
MacBook-Pro rangiffler-auth % gradle bootRun --args='--spring.profiles.active=local'

5. Run the other services: rangiffler-geo, rangiffler-photo, rangiffler-gateway, rangiffler-userdata

6. Run the tests using the bash script

bash run-tests.sh

Run Rangiffler with docker compose

There is the ability to run the application with the help of docker compose. It's important to have sql/create-db.sql file in order to run the application use

docker-compose up -d

The application url

http://127.0.0.1/landing

Run the end-to-end tests of the project

Run the tests using the bash script

bash run-tests.sh docker

By default, it starts in headless and uses 3 threads; however, it's possible to change the number of threads in the junit-platform.properties file as well as disable the headless Configuration.headless = false;

junit.jupiter.execution.parallel.config.fixed.parallelism={threads}
junit.jupiter.execution.parallel.config.fixed.max-pool-size={threads}

3. Generate Allure report

Note: If you run the tests by the bash script the report will be generated and opened automatically.

The result of the tests can be viewed through Allure report.

./gradlew allureServe

Examples of the test report

Allure

Allure2

About

The goals of the project are to create an application from scratch and create a test automation framework for the application using modern, relevant tools for writing automated tests.

Topics

Resources

Stars

Watchers

Forks