This document describes how to set up your local environment for TestGen development.
Login to your GitHub account.
Fork the dataops-testgen repository, following GitHub's guide.
Clone your forked repository locally.
git clone https://github.com/YOUR-USERNAME/dataops-testgenWe recommend using a Python virtual environment to avoid any dependency conflicts with other applications installed on your machine. The venv module, which is part of the Python standard library, or other third-party tools, like virtualenv or conda, can be used.
From the root of your local repository, create and activate a virtual environment with a TestGen-compatible version of Python (>=3.12). The steps may vary based on your operating system and Python installation - the Python packaging user guide is a useful reference.
On Linux/Mac
python3.12 -m venv venv
source venv/bin/activateOn Windows
py -3.12 -m venv venv
venv\Scripts\activateInstall the Python dependencies in editable mode.
On Linux
pip install -e .[dev]On Mac/Windows
pip install -e ".[dev]"On Mac, you can optionally install watchdog for better performance of the file watcher used for local development.
xcode-select --install
pip install watchdogCreate a local.env file with the following environment variables, replacing the <value> placeholders with appropriate values. Refer to the TestGen Configuration document for other supported values.
export TESTGEN_DEBUG=yes
export TESTGEN_LOG_TO_FILE=no
export TG_ANALYTICS=no
export TG_JWT_HASHING_KEY=<base64_key>
export TESTGEN_USERNAME=<username>
export TESTGEN_PASSWORD=<password>
export TG_DECRYPT_SALT=<decrypt_salt>
export TG_DECRYPT_PASSWORD=<decrypt_password>Source the file to apply the environment variables.
source local.envFor the Windows equivalent, refer to this guide.
Run a PostgreSQL instance as a Docker container.
docker compose -f docker-compose.local.yml up -dInitialize the application database for TestGen.
testgen setup-system-db --yesSeed the demo data.
testgen quick-startTestGen has two modules that have to be running: The web user interface (UI) and the Scheduler. The scheduler starts jobs (profiling, test execution, ...) at their scheduled times.
The following command starts both modules, each in their own process:
testgen run-appAlternatively, you can run each individually:
testgen run-app uitestgen run-app scheduler