{"id":31650440,"url":"https://github.com/dexilion-team/lastest","last_synced_at":"2025-10-10T16:01:20.232Z","repository":{"id":318330768,"uuid":"1069281187","full_name":"dexilion-team/lastest","owner":"dexilion-team","description":"Free Automated Visual Testing with or without AI","archived":false,"fork":false,"pushed_at":"2025-10-06T14:20:12.000Z","size":423,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-06T15:45:23.305Z","etag":null,"topics":["claude-code","copilotkit","playwright","testing","testing-tools"],"latest_commit_sha":null,"homepage":"htttp://www.dexilion.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dexilion-team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-03T17:22:52.000Z","updated_at":"2025-10-06T15:32:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dexilion-team/lastest","commit_stats":null,"previous_names":["dexilion-team/lastest"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dexilion-team/lastest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexilion-team%2Flastest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexilion-team%2Flastest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexilion-team%2Flastest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexilion-team%2Flastest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dexilion-team","download_url":"https://codeload.github.com/dexilion-team/lastest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexilion-team%2Flastest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278742889,"owners_count":26037915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-code","copilotkit","playwright","testing","testing-tools"],"created_at":"2025-10-07T08:29:33.089Z","updated_at":"2025-10-10T16:01:20.215Z","avatar_url":"https://github.com/dexilion-team.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lasTest\n\n\u003e AI-powered automated visual testing CLI that compares live vs dev environments mostly for vibe-coders.\n[![CI](https://github.com/dexilion-team/lastest/actions/workflows/ci.yml/badge.svg)](https://github.com/dexilion-team/lastest/actions/workflows/ci.yml)\n[![npm version](https://badge.fury.io/js/@dexilion%2Flastest.svg)](https://www.npmjs.com/package/@dexilion/lastest)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n```\n╔═══════════════════════════════════════════════════════════════════════════╗\n║   /\\_/\\           █████████████████████████████████████████████████████╗  ║\n║  ( o.o )          ╚════════════════════════██╔═════════════════════════╝  ║\n║   \u003e ^ \u003c   |\\_/|   ██╗      █████╗ ███████╗ ██║ ███████╗███████╗████████╗  ║\n║  /|   |\\ ( o.o )  ██║     ██╔══██╗██╔════╝ ██║ ██╔════╝██╔════╝╚══██╔══╝  ║\n║ (_|   |_) \u003e ^ \u003c   ██║     ███████║███████╗ ██║ █████╗  ███████╗   ██║     ║\n║    | |   /     \\  ██║     ██╔══██║╚════██║ ██║ ██╔══╝  ╚════██║   ██║     ║\n║    |_|  /_______\\ ███████╗██║  ██║███████║ ██║ ███████╗███████║   ██║     ║\n║                   ╚══════╝╚═╝  ╚═╝╚══════╝ ╚═╝ ╚══════╝╚══════╝   ╚═╝     ║\n║                                                                           ║\n║                                                 Automated Visual Testing  ║\n║                                                         made by Dexilion  ║\n║                                                             dexilion.com  ║\n║                                                                   v0.1.2  ║\n╚═══════════════════════════════════════════════════════════════════════════╝\n```\n\nAutomatically scans your codebase, generates Playwright tests using AI, and runs visual regression tests comparing your live and development environments. Get comprehensive reports with side-by-side screenshots and visual diffs. Perfect for vibe-coding.\n\n![lasTest Demo](docs/lastestvideo.gif)\n\n## ✨ Features\n\n- ⏱️ **30s Frontend PR Testing** - Complete visual regression testing from install to report in under 30 seconds\n- 🤖 **AI-Powered Test Generation** - Uses Claude Pro/Max or GitHub Copilot subscription to generate intelligent tests\n- 📝 **Template Mode** - Skip AI entirely for simple screenshot tests (faster, no AI costs)\n- 🔍 **Smart Route Detection** - Automatically discovers pages from Next.js, React Router, Vue Router, and more\n- 🧠 **AI Route Detection** - Optional AI-powered route discovery for complex routing patterns\n- 🎯 **Custom Test Instructions** - Add your own AI instructions (e.g., \"Click buttons, fill forms\")\n- 📸 **Visual Regression Testing** - Captures and compares screenshots with pixel-perfect accuracy\n- 🎨 **Beautiful Tabbed Reports** - Interactive HTML reports with Visual Comparison, Test Results, and Playwright views\n- 🎭 **Detailed Step Logging** - AI tests log execution steps (navigation, interactions, screenshots)\n- ⚡ **Parallel Execution** - Run tests concurrently for blazing-fast results\n- 🔧 **Highly Configurable** - Customize everything via `.lastestrc.json`\n- 💾 **Test Caching** - Generated tests are cached for fast re-runs without AI calls\n- 📊 **Error Tracking** - Comprehensive error logging with optional email notifications support\n\n## 🚀 Quick Start\n\n### Prerequisites\n\nYou'll need one of the following:\n- **Claude Pro or Claude Max subscription** + Claude CLI installed\n- **GitHub Copilot subscription** (Pro/Business/Enterprise) + Copilot CLI installed (requires Node.js 22+)\n\n### Setup\n\n```bash\nnpx @dexilion/lastest init\n```\n\nThat's it! The CLI will guide you through:\n\n1. **AI Provider** - Choose between Claude Subscription or GitHub Copilot\n2. **URLs** - Provide your live and dev URLs\n3. **Automated Testing** - Sit back while lasTest does the work\n\n## 📦 Installation\n\n### Global Installation\n\n```bash\nnpm install -g @dexilion/lastest\n```\n\n### Local Installation\n\n```bash\nnpm install --save-dev @dexilion/lastest\n```\n\n### npx (No Installation)\n\n```bash\nnpx @dexilion/lastest init\n```\n\n## 📖 Usage\n\n### Initial Setup\n\nRun this to create your configuration and generate tests:\n\n```bash\nlastest init\n```\n\nThis will:\n- Guide you through AI provider setup (Claude Subscription or Copilot Subscription)\n- Scan your codebase for routes\n- Generate tests using AI\n- Create `.lastestrc.json` (config) and `.lastest-tests.json` (cached tests)\n- Run the test suite\n\n### Re-running Tests\n\nOnce configured and tests are generated, simply run:\n\n```bash\nlastest\n```\n\nThis will:\n- Load your existing configuration and cached tests\n- **Skip AI generation** (uses cached tests for faster execution)\n- Run tests against both environments\n- Generate a fresh report\n\n### Regenerating Tests\n\nTo update your configuration or regenerate tests with AI:\n\n```bash\nlastest init\n```\n\nWhen you have an existing config, it will ask if you want to update it. This regenerates tests from scratch.\n\n### With Options\n\n```bash\nlastest init \\\n  --live https://example.com \\\n  --dev http://localhost:3000 \\\n  --ai claude-subscription \\\n  --scan ./src\n```\n\n### Using Config File\n\nThe `.lastestrc.json` file is automatically created during `init`:\n\n```json\n{\n  \"aiProvider\": \"claude-subscription\",\n  \"liveUrl\": \"https://example.com\",\n  \"devUrl\": \"http://localhost:3000\",\n  \"scanPath\": \"./src\",\n  \"outputDir\": \"lastest-results\",\n  \"viewport\": {\n    \"width\": 1920,\n    \"height\": 1080\n  },\n  \"diffThreshold\": 1,\n  \"parallel\": true,\n  \"maxConcurrency\": 5\n}\n```\n\nOr with GitHub Copilot:\n\n```json\n{\n  \"aiProvider\": \"copilot-subscription\",\n  \"liveUrl\": \"https://example.com\",\n  \"devUrl\": \"http://localhost:3000\"\n}\n```\n\nThen run:\n\n```bash\nlastest init\n```\n\n## 🎯 How It Works\n\n### AI Mode (Default)\n1. **Scan** - Analyzes your codebase to discover all routes/pages\n2. **Generate** - Uses AI to create intelligent Playwright tests with step logging\n3. **Cache** - Saves generated tests to `.lastest-tests.json` for fast re-runs\n4. **Execute** - Runs tests against both live and dev environments with detailed step tracking\n5. **Compare** - Performs pixel-perfect comparison of screenshots\n6. **Report** - Generates tabbed HTML report with Visual Comparison, Test Results, and Playwright views\n\n**AI Test Execution:**\n- Tests are transpiled from TypeScript to JavaScript at runtime\n- Executed in a secure VM sandbox with Playwright APIs\n- Step logging tracks navigation, interactions, and screenshot capture\n- Fallback to simple screenshot test only if screenshot is missing\n- Failed tests are marked as failed (no silent fallback)\n\n### Template Mode (No AI)\n1. **Scan** - Analyzes your codebase to discover all routes/pages\n2. **Generate** - Creates simple screenshot tests from templates (no AI calls)\n3. **Cache** - Saves generated tests to `.lastest-tests.json` for fast re-runs\n4. **Execute** - Runs tests against both live and dev environments\n5. **Compare** - Performs pixel-perfect comparison of screenshots\n6. **Report** - Generates tabbed HTML report with Visual Comparison, Test Results, and Playwright views\n\n**When to use Template Mode:**\n- You want fast test generation without AI costs\n- You only need basic screenshot comparisons\n- You don't need custom interactions (button clicks, form fills, etc.)\n\n## 💳 AI Provider Options\n\n**lasTest** supports two AI options - choose based on what you already have:\n\n| Option | Cost | Setup | Best For |\n|--------|------|-------|----------|\n| **Claude Subscription** | Included with Pro/Max ($20-$200/mo) | CLI authentication | Existing Claude Pro/Max users |\n| **GitHub Copilot** | Included with subscription ($10-$19/mo) | CLI authentication | Existing Copilot users |\n\n### Using Claude Pro/Max Subscription\n\n```bash\n# One-time setup\nnpm install -g @anthropic-ai/claude-code\nclaude login\n\n# Then use lasTest\nlastest init --ai claude-subscription\n```\n\n### Using GitHub Copilot Subscription\n\n```bash\n# One-time setup (requires Node.js 22+)\nnpm install -g @github/copilot\n\n# Authenticate (choose one):\n# Option 1: Interactive login\ncopilot\n# Then use /login command\n\n# Option 2: Use GitHub token\nexport GITHUB_TOKEN=your_token\n\n# Then use lasTest\nlastest init --ai copilot-subscription\n```\n\n## 📊 Output\n\nAfter running, you'll get:\n\n```\nlastest-results/\n├── report.html          # Interactive HTML report with tabbed view\n├── summary.md           # Markdown summary\n├── screenshots/\n│   ├── live/           # Live environment screenshots\n│   └── dev/            # Dev environment screenshots\n├── diffs/              # Visual difference images\n├── tests/              # Generated test files\n├── playwright-report/  # Playwright-compatible test report\n│   ├── index.html     # Detailed test execution report\n│   └── report.json    # Test results data\n└── data.json           # Raw test data\n```\n\n## 🎨 Report Preview\n\nThe HTML report includes a **tabbed interface** with three views:\n\n### 📸 Visual Comparison Tab\n- Side-by-side screenshot comparisons (live vs dev)\n- Visual diff highlighting with pixel difference percentage\n- Per-route comparison details\n- Environment-specific pass/fail statistics\n\n### 📊 Test Results Tab\n- Overall test summary with pass/fail counts\n- Environment breakdown (Live vs Dev)\n- Per-route test status\n- Test execution metrics\n\n### 📊 Step-by-Step Comparison Tab\n- Side-by-side comparison of live vs dev environments\n- Route-based grouping with parallel execution logs\n- Step-by-step execution details for both environments\n- Test timing and performance metrics per environment\n- Error stack traces and debugging info\n- Visual step indicators (✓ passed, ✗ failed)\n- Screenshot links for each environment\n\n## 🔧 Configuration Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `testGenerationMode` | `'ai' \\| 'template'` | `'ai'` | Test generation mode (AI or template) |\n| `aiProvider` | `'claude-subscription' \\| 'copilot-subscription'` | `'claude-subscription'` | AI provider for test generation (when mode is 'ai') |\n| `useAIRouteDetection` | `boolean` | `false` | Use AI to detect routes (more accurate but slower) |\n| `customTestInstructions` | `string` | - | Custom instructions for AI test generation (e.g., \"Click buttons, fill forms\") |\n| `liveUrl` | `string` | - | Live environment URL |\n| `devUrl` | `string` | - | Development environment URL |\n| `scanPath` | `string` | `'.'` | Path to scan for routes |\n| `outputDir` | `string` | `'lastest-results'` | Output directory for results |\n| `viewport` | `object` | `{width: 1920, height: 1080}` | Browser viewport size |\n| `diffThreshold` | `number` | `1` | Pixel difference threshold (0-1) |\n| `parallel` | `boolean` | `true` | Run tests in parallel |\n| `maxConcurrency` | `number` | `5` | Max parallel test executions |\n\n## 🌐 Framework Support\n\n**lastest** automatically detects and supports:\n\n- ✅ **Next.js** (App Router \u0026 Pages Router)\n- ✅ **React Router** (v6+)\n- ✅ **Vue Router** (v4+)\n- ✅ **Generic HTML/Static Sites**\n\n## 🤖 AI Providers\n\n### Claude Subscription (Pro/Max)\n\n```bash\n# One-time global setup\nnpm install -g @anthropic-ai/claude-code\nclaude login\n\n# Use in any project\nlastest init --ai claude-subscription\n```\n\n- **Cost**: Included with Claude Pro ($20/mo) or Max ($200/mo annual)\n- **Setup**: Browser authentication via Claude CLI\n- **Best for**: Existing Claude subscribers, unlimited usage within plan limits\n\n### GitHub Copilot Subscription\n\n```bash\n# One-time global setup (requires Node.js 22+)\nnpm install -g @github/copilot\n\n# Authenticate with /login or GITHUB_TOKEN\ncopilot\n# Then enter: /login\n\n# Use in any project\nlastest init --ai copilot-subscription\n```\n\n- **Cost**: Included with Copilot Pro ($10/mo), Business ($19/user/mo), or Enterprise\n- **Setup**: Interactive /login or GITHUB_TOKEN environment variable\n- **Best for**: Existing Copilot subscribers\n- **Requirements**: Node.js 22+ and npm 10+\n\n## 🔥 Advanced Usage\n\n### CI/CD Integration\n\nAdd to your GitHub Actions workflow:\n\n```yaml\nname: Visual Tests\n\non: [push, pull_request]\n\njobs:\n  visual-tests:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Setup Node.js\n        uses: actions/setup-node@v4\n        with:\n          node-version: '20'\n\n      - name: Install dependencies\n        run: npm install\n\n      - name: Run visual tests\n        env:\n          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}\n        run: |\n          npx @dexilion/lastest init \\\n            --live https://example.com \\\n            --dev http://localhost:3000 \\\n            --ai claude\n\n      - name: Upload results\n        uses: actions/upload-artifact@v4\n        with:\n          name: visual-test-results\n          path: lastest-results/\n```\n\n### Programmatic Usage\n\n```typescript\nimport { Scanner, TestGenerator, TestRunner, ReportGenerator } from '@dexilion/lastest';\n\nconst config = {\n  aiProvider: 'claude',\n  claudeApiKey: process.env.ANTHROPIC_API_KEY,\n  liveUrl: 'https://example.com',\n  devUrl: 'http://localhost:3000',\n  scanPath: '.',\n  outputDir: 'lastest-results',\n};\n\nconst scanner = new Scanner(config.scanPath);\nconst routes = await scanner.scan();\n\nconst generator = new TestGenerator(config);\nconst tests = await generator.generateTests(routes);\n\nconst runner = new TestRunner(config);\nconst results = await runner.runTests(tests);\n\nconst reporter = new ReportGenerator(config);\nawait reporter.generate(results);\n```\n\n## 🐛 Troubleshooting\n\n### Tests Failing\n\n- Ensure both URLs are accessible\n- Check that dev server is running\n- Verify network connectivity\n\n### API Key Issues\n\n```bash\n# Set Claude API key\nexport ANTHROPIC_API_KEY=your-key\n\n# Or add to .lastestrc.json\n{\n  \"claudeApiKey\": \"your-key\"\n}\n```\n\n### Screenshot Differences\n\n- Adjust `diffThreshold` in config\n- Check for dynamic content (dates, random elements)\n- Consider viewport size consistency\n\n## 🚨 Known Issues\n\n### GitHub Copilot CLI: TypeScript Not Found Error\n\n**Issue**: Intermittent errors when using `copilot-subscription` provider:\n```\n/bin/sh: 1: typescript: not found\n```\n\n**Root Cause**: The GitHub Copilot CLI attempts to execute a `typescript` command internally (likely for validation or processing), but expects it to be globally available. This happens inconsistently - sometimes Copilot validates/processes TypeScript, sometimes it doesn't.\n\n**Workarounds**:\n1. **Install TypeScript globally** (recommended):\n   ```bash\n   npm install -g typescript\n   ```\n\n2. **Add local TypeScript to PATH**:\n   ```bash\n   export PATH=\"$PATH:./node_modules/.bin\"\n   ```\n\n3. **Switch to Claude provider**:\n   ```bash\n   lastest init --ai claude-subscription\n   ```\n\n**Status**: This is a bug in the `@github/copilot` CLI package, not lasTest. The CLI should not require TypeScript to be globally installed when only generating code responses.\n\n## 📝 License\n\nMIT © [lastest contributors](LICENSE)\n\n## 🙏 Acknowledgments\n\n- Built with [Playwright](https://playwright.dev/)\n- Powered by [Claude](https://www.anthropic.com/) and [GitHub Copilot](https://github.com/features/copilot)\n- Inspired by the need for automated visual regression testing\n\n## 📬 Support\n\n- 🐛 [Report a Bug](https://github.com/yourusername/lastest/issues/new?template=bug_report.md)\n- 💡 [Request a Feature](https://github.com/yourusername/lastest/issues/new?template=feature_request.md)\n- 💬 [Discussions](https://github.com/yourusername/lastest/discussions)\n\n---\n\nMade with ❤️ for the open-source community\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdexilion-team%2Flastest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdexilion-team%2Flastest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdexilion-team%2Flastest/lists"}