Installation & Prerequisites
Prerequisites
Before installing the testing-api, ensure your development environment meets the following requirements:
- Runtime: Python 3.9 or higher.
- Package Manager:
pip(standard Python package installer). - Version Control: Git (to clone the repository).
- Supervised AI Account: Valid credentials and API access keys for the Supervised AI platform.
Installation
Follow these steps to set up the testing structure on your local machine.
1. Clone the Repository
Clone the testing-api repository and navigate to the project root:
git clone https://github.com/UditAkhourii/testing-api.git
cd testing-api
2. Environment Setup
It is highly recommended to use a virtual environment to isolate the project dependencies.
On macOS/Linux:
python3 -m venv venv
source venv/bin/activate
On Windows:
python -m venv venv
venv\Scripts\activate
3. Install Dependencies
Install all required libraries and the testing framework components:
pip install --upgrade pip
pip install -r requirements.txt
Configuration
The testing-api framework relies on environment variables to authenticate with the Supervised AI platform and manage testing targets.
Environment Variables
Create a .env file in the root directory of the project. This file is used to store sensitive configuration data.
| Variable | Type | Description |
| :--- | :--- | :--- |
| SAI_API_KEY | string | Required. Your unique API key from the Supervised AI dashboard. |
| SAI_ENVIRONMENT | string | The target environment (e.g., production, staging). |
| SAI_LOG_LEVEL | string | Desired logging verbosity (e.g., INFO, DEBUG, ERROR). |
Example .env file:
SAI_API_KEY=your_secret_api_key_here
SAI_ENVIRONMENT=staging
SAI_LOG_LEVEL=DEBUG
Verifying the Setup
To verify that the installation was successful and the environment is correctly configured, run the following command to check the framework version or help menu:
python -m testing_api --help
Note: If testing_api is used as an internal library within your CI/CD pipeline, ensure the environment variables are exported in your runner's shell.