Tresto 🎭🤖
Status: Pre-Release
Turbocharge your testing with AI. Tresto pairs Playwright codegen with an agent that understands your intent and iterates toward robust, stable tests.
Convert manual checks into reliable automated E2E in minutes—no boilerplate, no lock‑in, just tresto.yaml at your project root.
Why you’ll love it
- Manual testing everything is slow and fragile. It’s easy to miss regressions, hard to repeat precisely, and burns time every release.
- Writing E2E tests by hand is tedious. Locators break, timing is flaky, and keeping tests readable and maintainable takes effort.
- Tresto gives you the best of both worlds. Describe intent like you do in manual testing, and let AI produce durable, maintainable code you’d be proud to commit.
What makes Tresto different
- Generates fully valid pytest + Playwright tests. No bespoke runner, no lock‑in. You keep industry‑standard tools and best practices.
- You stay in control. Ask the model to improve selectors, assert more precisely, or refactor flows—Tresto listens and iterates.
- Post‑release sanity. Tests started failing after your last release? Ask Tresto to investigate each failing test and determine if code needs updating or if it’s a real product bug.
✨ Features
- 🎯 Smart test generation: Natural-language to runnable Playwright tests
- 🎭 Playwright integration: Uses the Playwright Python stack
- 🤖 Agentic workflow: Generate → run → analyze → iterate
- 🧠 Multi-provider AI: Anthropic Claude and others via connectors
- ⚙️ YAML config: Single
tresto.yamlat your project root - 🧪 Pytest-native: Tests are discoverable and runnable with pytest
🚀 Quick Start
Installation
pip install tresto-ai
Or from source:
git clone https://github.com/LeaveMyYard/Tresto.git
cd Tresto
uv tool install --no-cache .
Initialize in your project
tresto init
This will create:
- test scaffold in your chosen directory (default:
./tresto/tests) - a
tresto.yamlconfiguration file
Then install Playwright browsers once per machine:
playwright install
Create and iterate on tests
# Open interactive AI-driven flow to create a test
tresto test create --test-name login.success # optional name
# Iterate on an existing test with the agent
tresto test iterate --test-name login.success
# Run tests
tresto test run
📋 Requirements
- Python 3.11+ (3.13 preferred)
- Playwright browsers (
playwright install) - API key(s) for your selected AI provider(s)
- For Anthropic set
ANTHROPIC_API_KEY
- For Anthropic set
🛠️ Configuration (tresto.yaml)
After tresto init, edit tresto.yaml:
project:
name: my-awesome-app
url: http://localhost:3000
test_directory: ./tresto/tests
ai:
connector: anthropic
model: claude-3-5-sonnet-20241022
max_iterations: 5
temperature: 0.1
browser:
headless: true
timeout: 30000
viewport:
width: 1280
height: 720
recording:
auto_wait: true
capture_screenshots: true
generate_selectors: auto
secrets:
- ANTHROPIC_API_KEY
Notes:
secretsis a list of environment variable names. They must be present in your environment; they are validated at startup.connectorandmodelmust be one of the values exposed bytresto models list.
📖 CLI Commands
tresto: Shows a welcome panel and quick tipstresto init: Interactive setup; createstresto.yamland scaffolds tests- Options:
--force,--template <name>
- Options:
tresto models list: List available AI connectors and their modelstresto test: Alias for running tests (equivalent totresto test run)tresto test run [PYTEST_ARGS...]: Run tests via pytest, forwards extra argstresto test create [--test-name <name>]: Start agent to create a testtresto test iterate [--test-name <name>]: Iterate on a test with the agenttresto db list-tests|show|clear|info: Inspect and manage test data storagetresto version: Show Tresto version
Deprecated/changed:
.trestorc→ replaced withtresto.yamltresto record→ usetresto test createandtresto test iterate
🏗️ How it works
- Inspect project and prompts based on your intent
- Generate Playwright tests with the selected model
- Run with pytest; collect logs, screenshots, insights
- Iterate until assertions and flows are stable
🧰 Built with
Tresto is built on proven, open technologies:
- Python
- LangChain and LangGraph for agentic orchestration
- Playwright and Playwright codegen for robust, modern browser automation
Much thanks to the creators and maintainers of these projects—we stand on your shoulders.
🔭 Future plans
- Automatic locator improvements across your codebase
- Improved processing of larger tests
- Supervisor agent that reviews the main agent’s resulting test
- Cloud model runner: access multiple providers from one subscription
- …and more improvements coming
🤝 Contributing
See docs/CONTRIBUTING.md.
Development
git clone https://github.com/LeaveMyYard/Tresto.git
cd Tresto
uv sync --dev
pre-commit install
pytest
ruff check .
mypy .
📄 License
MIT — see LICENSE.
📞 Support
- Docs:
./docs/ - Issues: https://github.com/LeaveMyYard/Tresto/issues
- Discussions: https://github.com/LeaveMyYard/Tresto/discussions
Metadata
Release files for tresto-ai 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tresto_ai-0.3.2.tar.gz | 11.2 MB | Without provenance | Details for tresto_ai-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tresto_ai-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for tresto_ai-0.3.2-py3-none-any.whl |
Total release size: 11.3 MB
Release files / tresto_ai-0.3.2.tar.gz
| Download URL | tresto_ai-0.3.2.tar.gz |
|---|---|
| Size | 11.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe48068996891e52cb85e74be49ab67e4bf6af7cf7de40ef8b83ca6a1ed331e2
|
|
BLAKE2b-256 checksum How to use checksums |
00d556568b2f3dc0a796f282202ff4ab6b7d78fc1dd04c9d0853afb845e2b994
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.23
|
Release files / tresto_ai-0.3.2-py3-none-any.whl
| Download URL | tresto_ai-0.3.2-py3-none-any.whl |
|---|---|
| Size | 82.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c3f94ee94aa3e0a8b730f6eb6f156905bdc956bf3164ecf56503f9ae361020f
|
|
BLAKE2b-256 checksum How to use checksums |
29f7aec1a61940aec6642b6eecb50f7a967c3ffd9fa8627800e2aac03f6c1117
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.23
|
Security for tresto-ai 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.