A Python project to establish a unified, automated testing framework for microservices.
Project description
CONC-Automation-Test-Tool
This project aims to establish a unified, automated testing framework for feature, nightly, and scale tests tailored to each microservice, eliminating node setup dependencies. It involves key microservice components like Kafka messaging, REST calls, cache, and database interactions, orchestrated to ensure thorough validation of microservice functionalities. The framework utilizes a Test Orchestrator to automate test inputs, execute workflows, and validate outputs by leveraging dynamically generated orchestration XLS files. Additionally, it supports concurrent testing of multiple microservices on virtual machines, enabling faster test execution and seamless integration of new features and regression tests.
Features
- Modular code structure in the
src/directory. - Unit tests in the
tests/folder. - Configurations separated in the
config/directory. - Comprehensive documentation in
docs/.
Setup Instructions
Prerequisites
- Python 3.6+: Ensure you have Python 3.6 or higher installed on your machine.
- PostgreSQL: Ensure you have PostgreSQL installed and running.
Step-by-Step Instructions
-
Clone the Repository:
git clone <repository_url> cd conc_automation_test_tool
-
Create and Activate a Virtual Environment:
python3 -m venv venv source venv/bin/activate # On Windows: .\venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Configure Environment Variables: Create a
.envfile in the root directory of the project. This file will store your environment variables, such as database connection details and secret keys.touch .envAdd the following content to the
.envfile:DATABASE_URL=postgresql://myuser:prince123@localhost/test1 SECRET_KEY=your_secret_keyReplace
myuser,prince123,localhost, andtest1with your actual PostgreSQL username, password, host, and database name, respectively. Replaceyour_secret_keywith a secret key of your choice. -
Set Up the Database:
-
Define Models: The database schema is defined in the
models.pyfile located insrc/apps/app1. Ensure that the models are correctly defined. -
Create Tables: Run the
create_tables.pyscript to create the tables in the database.export PYTHONPATH=$(pwd)/src python -m db.create_tables
-
-
Running the Flask Application: Start the Flask application by running the
run.pyscript.python src/run.pyThe application will start, and you can access it at
http://127.0.0.1:5000. -
Accessing API Endpoints: The following API endpoints are available:
GET Requests
-
GET
/api/v1/getDataWorkflow: Fetch data from theWorkFlowtable.curl http://127.0.0.1:5000/api/v1/getDataWorkflow -
GET
/api/v1/getDataSimulatedData: Fetch data from theSimulatedDatatable.curl http://127.0.0.1:5000/api/v1/getDataSimulatedData
Note: The above get responses will be of json format.
POST Requests
-
POST
/api/v1/postDataWorkflow: Insert records into theWorkFlowtable by uploading an XLSX file.curl -X POST -F "file=@workflow_data.xlsx" http://127.0.0.1:5000/api/v1/postDataWorkflow
-
POST
/api/v1/postDataSimulatedData: Insert records into theSimulatedDatatable by uploading an XLSX file.curl -X POST -F "file=@simulated_data.xlsx" http://127.0.0.1:5000/api/v1/postDataSimulatedData
-
Flow Diagram
Below is a flow diagram illustrating the process of uploading an XLSX file, validating the data, and inserting it into the database.
graph TD;
A[Upload XLSX File] --> B[Read XLSX File]
B --> C[Validate Data]
C -->|Valid| D[Insert into Database]
C -->|Invalid| E[Return Error]
D --> F[Success Response]
E --> F[Error Response]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file conc_automation_test_tool-0.2.0.tar.gz.
File metadata
- Download URL: conc_automation_test_tool-0.2.0.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
805c038edef4969b59392660973fc9c7a517feb82d09e0156a03b59687ddcb5d
|
|
| MD5 |
c976df6dac0ef009e7b3d8f3aaecd528
|
|
| BLAKE2b-256 |
4ca32719df18abd4d6ee135654318b45379389d942dd5b0f0d276d09fcff9900
|
File details
Details for the file conc_automation_test_tool-0.2.0-py3-none-any.whl.
File metadata
- Download URL: conc_automation_test_tool-0.2.0-py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd47d79720fe890b0b1c02602f8622f5dbf1af509147c268dc920cf5ea1a97f9
|
|
| MD5 |
690ba96e05e43e95e45bd50695662f01
|
|
| BLAKE2b-256 |
5e7adb302ca2a1f0f4fd4157dc9fb365fdaf6ae0482b5e297aa3192b6b9bf297
|
File details
Details for the file conc_automation_test_tool-0.2-py3-none-any.whl.
File metadata
- Download URL: conc_automation_test_tool-0.2-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8646834edca271639b121f4fddd557bf5eff8aa015bde4110fe6d1150d8d735e
|
|
| MD5 |
efef9656ae004fe824fb7128454a3004
|
|
| BLAKE2b-256 |
01cfe6a214fab12333815863c93b3102df18044c24ced47ca0dacfa84df33a07
|
File details
Details for the file CONC_Automation_Test_Tool-0.2-py3-none-any.whl.
File metadata
- Download URL: CONC_Automation_Test_Tool-0.2-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c7973157f7bc6c0747d015a5e16b71de04777df133d90ff7309c6c9ea0e5578
|
|
| MD5 |
52d84d6fa9caafce4d1a9a533b5f0449
|
|
| BLAKE2b-256 |
136559dd180da72a38396afdf91e45855f2ddaffd05b82c4554279ff42fe5531
|