Some services and helpers to provide local testing options and boost your productivity 🚀
Name | Goal | Stack | Ready to Use? |
---|---|---|---|
Local Testing API | Provide sample endpoints call on local tests | Node.js and Express | ✅ |
Local Testing DB | Provide a PostgreSQL database to call on local APIs or run queries/triggers | Docker and Docker Compose | ✅ |
Localstack | Provide local AWS services such as SNS and SQS | Docker and Docker Compose | ❌ |
Stress Tester | Provides an interface to execute stress tests | Python, pip and Locust (Python module) | ❌ |
Here are some relevant directories and files:
The Local Testing API directory. The structure follows the Node.js + Express REST APIs convention.
For more details check the README.
Contains useful scripts to services and all the general purposes.
db
directory contains some useful SQL queries to create the testing database and other related purposes.localstack.sh
is the Localstack starting script.
For more details check the README.
The Stress Tester directory that contains a single locustfile.py
to execute the tests.
For more details check the README.
Contains all the Docker provided services.
local_db
: PostgreSQL database to testing.localstack
: TO BE DEFINED
For more details check the docker-compose.yml
.
Has all of the necessary and useful commands to run the services. You can run commands by make <listed command>
at the this directory.
For more details check the Makefile
.
The environment variables example file.
First of all you'll need to copy .env.example
file:
cp .env.example .env
The Makefile
provides some alias for different commands and and maintain all of then on the same file and directory.
Now 😄 from root directory:
To install dependencies:
make api-install
To run the API:
make api-run
To start, stop and restart the database:
make db-start
make db-stop
make db-restart
To see database logs
make db-logs
To access PostgreSQL shell:
make db-shell
TO BE DEFINED
TO BE DEFINED
- Stress Tester
- Define
locustfile.py
correctly to simple load test - Write README file
- Run Locust on Docker
- Define
- Localstack
- Install localstack on Docker Compose
- Create init script containing SNS topic and SQS Queue
- Local Testing API
- Implement custom error responses endpoints
- Local Testing DB
- Create basic structure query
- Create insertions query
Made to help daily testing when you don't have automated testing or some kind of staging environment with ❤️ by RafaelEmery