integration-tests
БесплатноБез исполняемых скриптовНе проверенSetup Python virtual environment and run integration tests with gltest
от genlayerlabs★ 188 звёзд на GitHubОб этом скилле
Run Integration Tests
Setup the Python environment, start the studio, and run integration tests for GenLayer Studio.
Prerequisites
- Python 3.12 installed
- virtualenv installed (
pip install virtualenv) - Docker and Docker Compose installed
Step 1: Start the Studio
The studio must be running before executing integration tests.
# Stop any existing containers and rebuild
docker-compose down && docker-compose up --build
Wait for all services to be healthy before proceeding.
Step 2: Setup Virtual Environment (first time or reset)
In a separate terminal:
# Remove existing venv if present
rm -rf .venv
# Create new venv with Python 3.12
virtualenv -p python3.12 .venv
# Activate
source .venv/bin/activate
# Upgrade pip
pip install --upgrade pip
# Install all dependencies
pip install -r requirements.txt
pip install -r requirements.test.txt
pip install -r backend/requirements.txt
# Set Python path
export PYTHONPATH="$(pwd)"
Step 3: Run Integration Tests
# Activate venv (if not already)
source .venv/bin/activate
export PYTHONPATH="$(pwd)"
# Run all integration tests (serial)
gltest --contracts-dir . tests/integration
# Run tests in parallel (4 workers) - excludes test_validators.py
gltest --contracts-dir . tests/integration -n 4 --ignore=tests/integration/test_validators.py
# Run validator CRUD tests separately (must run serially)
gltest --contracts-dir . tests/integration/test_validators.py
# Run faster with leader-only mode (skips validator consensus)
gltest --contracts-dir . tests/integration --leader-only
# Run specific test file
gltest --contracts-dir . tests/integration/test_specific.py
# Run with verbose output
gltest --contracts-dir . tests/integration -v
# Run specific test function
gltest --contracts-dir . tests/integration/test_file.py::test_function_name
Parallel Execution Notes
- Use
-n 4to run tests in parallel with 4 workers (pytest-xdist) test_validators.pymust be excluded from parallel runs (--ignore) because it tests validator CRUD operations and needs exclusive access to the validator state- Run
test_validators.pyseparately after parallel tests complete
Quick Commands
Full Setup (first time)
# Terminal 1: Start studio
docker-compose down && docker-compose up --build
# Terminal 2: Setup and run tests
rm -rf .venv && \
virtualenv -p python3.12 .venv && \
source .venv/bin/activate && \
pip install --upgrade pip && \
pip install -r requirements.txt && \
pip install -r requirements.test.txt && \
pip install -r backend/requirements.txt && \
export PYTHONPATH="$(pwd)" && \
gltest --contracts-dir . tests/integration
Quick Run (after initial setup, studio already running)
source .venv/bin/activate && export PYTHONPATH="$(pwd)" && gltest --contracts-dir . tests/integration
Parallel Run (4 workers)
source .venv/bin/activate && export PYTHONPATH="$(pwd)" && \
gltest --contracts-dir . tests/integration -n 4 --ignore=tests/integration/test_validators.py && \
gltest --contracts-dir . tests/integration/test_validators.py
Fast Run (leader-only mode)
source .venv/bin/activate && export PYTHONPATH="$(pwd)" && gltest --contracts-dir . tests/integration --leader-only
Troubleshooting
Studio Not Running
# Check if containers are up
docker-compose ps
# Check container logs
docker-compose logs -f backend
Connection Refused Errors
The studio needs time to initialize. Wait for all services to be healthy:
# Watch container status
docker-compose ps
# Check backend health
curl http://localhost:4000/health
Python 3.12 Not Found
# Check available Python versions
which python3.12
# On macOS with Homebrew
brew install [email protected]
gltest Command Not Found
# Make sure venv is activated
source .venv/bin/activate
# Reinstall test dependencies
pip install -r requirements.test.txt
Import Errors
# Ensure PYTHONPATH is set
export PYTHONPATH="$(pwd)"
# Verify from project root
pwd # Should be genlayer-studio
Test Timeouts
Integration tests may timeout if the studio is under load. Try:
# Run with leader-only for faster execution
gltest --contracts-dir . tests/integration --leader-only
# Run a single test file to isolate issues
gltest --contracts-dir . tests/integration/test_specific.py -v
Установить integration-tests в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл integration-tests?
Setup Python virtual environment and run integration tests with gltest
Как установить скилл integration-tests?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл integration-tests запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic