nikosmokas / automated-api-tester

An application for api and availability testing. Built with React, nodejs, MongoDB, AWS EC2, Terraform and deployed with Docker
https://api-tester.nmokas-dev.tech/
1 stars 0 forks source link
api api-client api-server automated-testing availability-checker docker nodejs react

Automated API Tester

A web application for automated API testing, featuring both a client and a server. This guide covers setting up the project, running it with Docker, and managing it on a remote server.

Table of Contents

Application Composition

Automated API Tester is a web application consisting of a React frontend and a Node.js backend.

Overall Architecture:

Prerequisites

Before you begin, ensure you have the following installed on your local machine:

Project Structure

automated-api-tester/ ├── client/ │ ├── Dockerfile │ ├── package.json │ └── ... (other client files) ├── server/ │ ├── Dockerfile │ ├── package.json │ └── ... (other server files) ├── docker-compose.yml ├── Dockerfile └── README.md

Setup

  1. Clone the Repository

git clone <repository-url>

cd automated-api-tester

  1. Install Docker and Docker Compose

    Follow the instructions on the official Docker website to install Docker and Docker Compose.

Running with Docker

Build and Start Containers

  1. Build and Run in Detached Mode

    To build the Docker images and start the containers in the background:

    docker-compose up -d --build

This command will build the images defined in the docker-compose.yml file and start the containers in detached mode.

  1. Check Container Status

    To check if the containers are running:

    docker-compose ps

  2. View Logs

    To view the logs of your services:

    docker-compose logs

  3. Stop and Remove Containers

To stop and remove the containers:

docker-compose down

  1. Update report and restart application
# SSH into your server
ssh user@your-server-ip

# Navigate to your project directory
cd /path/to/your/project

# Pull the latest code
git pull origin main  # or the appropriate branch

# Rebuild the Docker images
docker-compose build

# Restart the Docker containers
docker-compose up -d

# Clean up old Docker resources (optional)
docker system prune -f

Thank you