Overview
This tutorial shows you how to:- Run unit tests in isolated sandboxes
- Execute integration tests with dependencies
- Run tests in parallel
- Generate test reports
- Clean up resources automatically
Prerequisites
- Python SDK installed (
pip install hopx-ai) - API key configured (see Authentication)
- Basic understanding of testing frameworks (pytest, unittest, etc.)
Step 1: Basic Test Execution
Run tests in an isolated sandbox:- Python
- JavaScript/TypeScript
Step 2: Test with Dependencies
Run tests that require external dependencies:- Python
- JavaScript/TypeScript
Step 3: Parallel Test Execution
Run multiple test suites in parallel:- Python
- JavaScript/TypeScript
Step 4: Complete Testing Framework
Build a complete testing framework:- Python
- JavaScript/TypeScript
Best Practices
✅ DO: Use Isolated Sandboxes
✅ DO: Use Isolated Sandboxes
Each test suite should run in its own sandbox for complete isolation:
✅ DO: Set Timeouts
✅ DO: Set Timeouts
Always set reasonable timeouts to prevent hanging tests:
✅ DO: Generate Reports
✅ DO: Generate Reports
Generate test reports for CI/CD integration:
✅ DO: Clean Up Resources
✅ DO: Clean Up Resources
Always clean up sandboxes after tests complete:

