Name | tresto-ai JSON |
Version |
0.3.0
JSON |
| download |
home_page | None |
Summary | AI-powered E2E testing CLI inspired by Playwright codegen |
upload_time | 2025-09-02 12:40:08 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.13 |
license | None |
keywords |
ai
automation
e2e
playwright
testing
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Tresto ๐ญ๐ค
## Warning: Still in development
**Test + Presto = Tresto**
An AI-powered E2E testing CLI that revolutionizes how you create and maintain automated tests. Inspired by Playwright's codegen but enhanced with intelligent AI agents that don't just record your actionsโthey understand, analyze, and write robust test code for you.
## โจ Features
- **๐ฏ Smart Test Generation**: AI agents that understand your testing intent, not just your clicks
- **๐ญ Playwright Integration**: Built on the robust Playwright testing framework
- **๐ค AI-Powered Code Writing**: Intelligent agents that write, run, and iterate on test code
- **๐ Simple CLI Interface**: Easy-to-use commands for rapid test development
- **๐ Multiple AI Models**: Currently supports Claude-4, with more models coming soon
- **โ๏ธ Configurable**: Flexible configuration system for different project needs
- **๐ Python-First**: Generates clean, maintainable Python test code
## ๐ Quick Start
### Installation
```bash
# Install via pip (coming soon)
pip install tresto
# Or install from source
git clone https://github.com/LeaveMyYard/Tresto.git
cd Tresto
uv sync
```
### Setup Your Project
```bash
# Initialize Tresto in your project
tresto init
# This creates:
# - tests/ directory structure
# - .trestorc configuration file
# - Basic test templates
```
### Record Your First Test
```bash
# Start an interactive test recording session
tresto record
# The CLI will:
# 1. Ask what you want to test and how to name it
# 2. Launch a browser and record your actions
# 3. Have an AI agent write optimized test code
# 4. Run and iterate on the code until it works perfectly
```
## ๐ Requirements
- Python 3.9+
- A modern web browser (Chrome, Firefox, Safari, or Edge)
- Claude API key (set as `ANTHROPIC_API_KEY` environment variable)
## ๐ ๏ธ Configuration
After running `tresto init`, edit your `.trestorc` file:
```toml
[project]
name = "my-awesome-app"
base_url = "http://localhost:3000"
test_directory = "./tests"
[browser]
headless = false
timeout = 30000
viewport = { width = 1280, height = 720 }
[ai]
model = "claude-3-5-sonnet-20241022"
max_iterations = 5
temperature = 0.1
[recording]
auto_wait = true
capture_screenshots = true
generate_selectors = "smart"
```
## ๐ Commands
### `tresto init`
Initializes a new Tresto project in the current directory.
**Options:**
- `--force`: Overwrite existing configuration
- `--template`: Use a specific template (default, react, vue, etc.)
### `tresto record`
Starts an interactive test recording session.
**Options:**
- `--name`: Pre-specify the test name
- `--description`: Pre-specify what the test should do
- `--headless`: Run browser in headless mode
- `--iterations`: Maximum AI iterations for code improvement
### `tresto run`
Run existing tests (coming soon).
### `tresto validate`
Validate test code and configuration (coming soon).
## ๐๏ธ How It Works
1. **Recording Phase**: Tresto launches a Playwright browser and records your interactions
2. **Analysis Phase**: AI agents analyze your actions and understand the testing intent
3. **Code Generation**: AI writes initial test code based on recorded actions and intent
4. **Validation Phase**: The code is executed and analyzed for correctness
5. **Iteration Phase**: AI iteratively improves the code based on execution results
6. **Finalization**: Clean, documented test code is saved to your test directory
## ๐ฏ Example Generated Test
```python
import pytest
from playwright.async_api import Page, expect
class TestUserLogin:
"""Test user authentication flow"""
async def test_successful_login_redirects_to_dashboard(self, page: Page) -> None:
"""Test that a valid user can log in and is redirected to dashboard"""
# Navigate to login page
await page.goto("/login")
# Fill in credentials
await page.fill('[data-testid="email-input"]', "user@example.com")
await page.fill('[data-testid="password-input"]', "password123")
# Submit form
await page.click('[data-testid="login-button"]')
# Verify successful login
await expect(page).to_have_url("/dashboard")
await expect(page.locator('[data-testid="welcome-message"]')).to_be_visible()
await expect(page.locator('[data-testid="user-name"]')).to_contain_text("Welcome")
```
## ๐ฎ Roadmap
- **Multi-Model Support**: Add support for GPT-4, Gemini, and other AI models
- **Language Support**: Generate tests in TypeScript, JavaScript, and other languages
- **Visual Testing**: AI-powered visual regression testing
- **API Testing**: Extend beyond E2E to API test generation
- **CI/CD Integration**: Built-in support for popular CI/CD platforms
- **Team Features**: Collaborative test development and sharing
- **Premium Features**: Advanced AI models and priority support via subscription
## ๐ค Contributing
We welcome contributions! Please see our [Contributing Guide](./docs/CONTRIBUTING.md) for details.
### Development Setup
```bash
# Clone the repository
git clone https://github.com/LeaveMyYard/Tresto.git
cd Tresto
# Install dependencies with uv
uv sync --dev
# Install pre-commit hooks
pre-commit install
# Run tests
pytest
# Run linting
ruff check .
mypy .
```
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## ๐ Acknowledgments
- **Playwright Team**: For creating an amazing browser automation framework
- **Anthropic**: For Claude, the AI that powers our intelligent test generation
- **FastAPI & Typer**: For inspiration on creating developer-friendly CLI tools
## ๐ Support
- ๐ [Documentation](./docs/)
- ๐ [Issue Tracker](https://github.com/LeaveMyYard/Tresto/issues)
- ๐ฌ [Discussions](https://github.com/LeaveMyYard/Tresto/discussions)
---
**Made with โค๏ธ by developers, for developers**
*Tresto: Because testing should be as fast as your ideas* โก
Raw data
{
"_id": null,
"home_page": null,
"name": "tresto-ai",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.13",
"maintainer_email": null,
"keywords": "ai, automation, e2e, playwright, testing",
"author": null,
"author_email": "LeaveMyYard <zhukovpavel2001@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/77/92/d922d81f5d9be687a9d3ab2a899fa7aafb1dd0fd53d0334cb9e88b3d3a0f/tresto_ai-0.3.0.tar.gz",
"platform": null,
"description": "# Tresto \ud83c\udfad\ud83e\udd16\n## Warning: Still in development\n\n**Test + Presto = Tresto**\n\nAn AI-powered E2E testing CLI that revolutionizes how you create and maintain automated tests. Inspired by Playwright's codegen but enhanced with intelligent AI agents that don't just record your actions\u2014they understand, analyze, and write robust test code for you.\n\n## \u2728 Features\n\n- **\ud83c\udfaf Smart Test Generation**: AI agents that understand your testing intent, not just your clicks\n- **\ud83c\udfad Playwright Integration**: Built on the robust Playwright testing framework\n- **\ud83e\udd16 AI-Powered Code Writing**: Intelligent agents that write, run, and iterate on test code\n- **\ud83d\ude80 Simple CLI Interface**: Easy-to-use commands for rapid test development\n- **\ud83d\udcdd Multiple AI Models**: Currently supports Claude-4, with more models coming soon\n- **\u2699\ufe0f Configurable**: Flexible configuration system for different project needs\n- **\ud83d\udc0d Python-First**: Generates clean, maintainable Python test code\n\n## \ud83d\ude80 Quick Start\n\n### Installation\n\n```bash\n# Install via pip (coming soon)\npip install tresto\n\n# Or install from source\ngit clone https://github.com/LeaveMyYard/Tresto.git\ncd Tresto\nuv sync\n```\n\n### Setup Your Project\n\n```bash\n# Initialize Tresto in your project\ntresto init\n\n# This creates:\n# - tests/ directory structure\n# - .trestorc configuration file\n# - Basic test templates\n```\n\n### Record Your First Test\n\n```bash\n# Start an interactive test recording session\ntresto record\n\n# The CLI will:\n# 1. Ask what you want to test and how to name it\n# 2. Launch a browser and record your actions\n# 3. Have an AI agent write optimized test code\n# 4. Run and iterate on the code until it works perfectly\n```\n\n## \ud83d\udccb Requirements\n\n- Python 3.9+\n- A modern web browser (Chrome, Firefox, Safari, or Edge)\n- Claude API key (set as `ANTHROPIC_API_KEY` environment variable)\n\n## \ud83d\udee0\ufe0f Configuration\n\nAfter running `tresto init`, edit your `.trestorc` file:\n\n```toml\n[project]\nname = \"my-awesome-app\"\nbase_url = \"http://localhost:3000\"\ntest_directory = \"./tests\"\n\n[browser]\nheadless = false\ntimeout = 30000\nviewport = { width = 1280, height = 720 }\n\n[ai]\nmodel = \"claude-3-5-sonnet-20241022\"\nmax_iterations = 5\ntemperature = 0.1\n\n[recording]\nauto_wait = true\ncapture_screenshots = true\ngenerate_selectors = \"smart\"\n```\n\n## \ud83d\udcd6 Commands\n\n### `tresto init`\nInitializes a new Tresto project in the current directory.\n\n**Options:**\n- `--force`: Overwrite existing configuration\n- `--template`: Use a specific template (default, react, vue, etc.)\n\n### `tresto record`\nStarts an interactive test recording session.\n\n**Options:**\n- `--name`: Pre-specify the test name\n- `--description`: Pre-specify what the test should do\n- `--headless`: Run browser in headless mode\n- `--iterations`: Maximum AI iterations for code improvement\n\n### `tresto run`\nRun existing tests (coming soon).\n\n### `tresto validate`\nValidate test code and configuration (coming soon).\n\n## \ud83c\udfd7\ufe0f How It Works\n\n1. **Recording Phase**: Tresto launches a Playwright browser and records your interactions\n2. **Analysis Phase**: AI agents analyze your actions and understand the testing intent\n3. **Code Generation**: AI writes initial test code based on recorded actions and intent\n4. **Validation Phase**: The code is executed and analyzed for correctness\n5. **Iteration Phase**: AI iteratively improves the code based on execution results\n6. **Finalization**: Clean, documented test code is saved to your test directory\n\n## \ud83c\udfaf Example Generated Test\n\n```python\nimport pytest\nfrom playwright.async_api import Page, expect\n\nclass TestUserLogin:\n \"\"\"Test user authentication flow\"\"\"\n \n async def test_successful_login_redirects_to_dashboard(self, page: Page) -> None:\n \"\"\"Test that a valid user can log in and is redirected to dashboard\"\"\"\n # Navigate to login page\n await page.goto(\"/login\")\n \n # Fill in credentials\n await page.fill('[data-testid=\"email-input\"]', \"user@example.com\")\n await page.fill('[data-testid=\"password-input\"]', \"password123\")\n \n # Submit form\n await page.click('[data-testid=\"login-button\"]')\n \n # Verify successful login\n await expect(page).to_have_url(\"/dashboard\")\n await expect(page.locator('[data-testid=\"welcome-message\"]')).to_be_visible()\n await expect(page.locator('[data-testid=\"user-name\"]')).to_contain_text(\"Welcome\")\n```\n\n## \ud83d\udd2e Roadmap\n\n- **Multi-Model Support**: Add support for GPT-4, Gemini, and other AI models\n- **Language Support**: Generate tests in TypeScript, JavaScript, and other languages\n- **Visual Testing**: AI-powered visual regression testing\n- **API Testing**: Extend beyond E2E to API test generation\n- **CI/CD Integration**: Built-in support for popular CI/CD platforms\n- **Team Features**: Collaborative test development and sharing\n- **Premium Features**: Advanced AI models and priority support via subscription\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](./docs/CONTRIBUTING.md) for details.\n\n### Development Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/LeaveMyYard/Tresto.git\ncd Tresto\n\n# Install dependencies with uv\nuv sync --dev\n\n# Install pre-commit hooks\npre-commit install\n\n# Run tests\npytest\n\n# Run linting\nruff check .\nmypy .\n```\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\ude4f Acknowledgments\n\n- **Playwright Team**: For creating an amazing browser automation framework\n- **Anthropic**: For Claude, the AI that powers our intelligent test generation\n- **FastAPI & Typer**: For inspiration on creating developer-friendly CLI tools\n\n## \ud83d\udcde Support\n\n- \ud83d\udcd6 [Documentation](./docs/)\n- \ud83d\udc1b [Issue Tracker](https://github.com/LeaveMyYard/Tresto/issues)\n- \ud83d\udcac [Discussions](https://github.com/LeaveMyYard/Tresto/discussions)\n\n---\n\n**Made with \u2764\ufe0f by developers, for developers**\n\n*Tresto: Because testing should be as fast as your ideas* \u26a1\n",
"bugtrack_url": null,
"license": null,
"summary": "AI-powered E2E testing CLI inspired by Playwright codegen",
"version": "0.3.0",
"project_urls": {
"Bug Tracker": "https://github.com/LeaveMyYard/Tresto/issues",
"Documentation": "https://github.com/LeaveMyYard/Tresto#readme",
"Homepage": "https://github.com/LeaveMyYard/Tresto",
"Repository": "https://github.com/LeaveMyYard/Tresto"
},
"split_keywords": [
"ai",
" automation",
" e2e",
" playwright",
" testing"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "0a4874a0306f908a4fb41bd6ec4c4ac8be307c500619ecee8534b76714fc6391",
"md5": "274b10016c6e4a9bfc7c89bc3729abb5",
"sha256": "4f5860c639ebe802fa3bdc517f693cccd9051bb1ff936611acdf23b56b9795de"
},
"downloads": -1,
"filename": "tresto_ai-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "274b10016c6e4a9bfc7c89bc3729abb5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.13",
"size": 82156,
"upload_time": "2025-09-02T12:40:04",
"upload_time_iso_8601": "2025-09-02T12:40:04.773434Z",
"url": "https://files.pythonhosted.org/packages/0a/48/74a0306f908a4fb41bd6ec4c4ac8be307c500619ecee8534b76714fc6391/tresto_ai-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7792d922d81f5d9be687a9d3ab2a899fa7aafb1dd0fd53d0334cb9e88b3d3a0f",
"md5": "dca56413aafad40083e5e5780c2d854b",
"sha256": "bab59f6aee4e3f5ea521b5e11f13c14f7f3b6585cc2ef0e967e324bf08eba58d"
},
"downloads": -1,
"filename": "tresto_ai-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "dca56413aafad40083e5e5780c2d854b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.13",
"size": 11218824,
"upload_time": "2025-09-02T12:40:08",
"upload_time_iso_8601": "2025-09-02T12:40:08.353133Z",
"url": "https://files.pythonhosted.org/packages/77/92/d922d81f5d9be687a9d3ab2a899fa7aafb1dd0fd53d0334cb9e88b3d3a0f/tresto_ai-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-02 12:40:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "LeaveMyYard",
"github_project": "Tresto",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "tresto-ai"
}