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-testgen
We 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/activate
On Windows
py -3.12 -m venv venv
venv\Scripts\activate
Install 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 watchdog
Create 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 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.env
For the Windows equivalent, refer to this guide.
Run a PostgreSQL instance as a Docker container.
docker compose -f docker-compose.local.yml up -d
Initialize the application database for TestGen.
testgen setup-system-db --yes
Seed the demo data.
testgen quick-start --delete-target-db
testgen run-profile --table-group-id 0ea85e17-acbe-47fe-8394-9970725ad37d
testgen run-test-generation --table-group-id 0ea85e17-acbe-47fe-8394-9970725ad37d
testgen run-tests --project-key DEFAULT --test-suite-key default-suite-1
testgen quick-start --simulate-fast-forward
Run the local Streamlit-based TestGen application. It will open the browser at http://localhost:8501.
testgen ui run