TronScan Test
raw JSON → 1.4.2 verified Sat Apr 25 auth: no javascript
TronScan Test v1.4.2 is an AI-driven E2E and API test automation toolkit specifically built for tronscan.org. It leverages Playwright and agentic patterns (Planner/Generator/Healer/DataValidator) to provide 47 pre-built test cases across 6 pages (Homepage, Block, Transaction, Address, Contract, Token List). Unlike generic test frameworks, it offers a unified CLI (init, test, report, setup-agent, mcp, heal), built-in AI agent configuration for Claude, Cursor, Copilot, and Windsurf, and an MCP server for AI tool integration. It supports headed/headless mode, HTML reports with video, trace, and screenshot. Requires @playwright/test >=1.56.0.
Common errors
error Could not resolve '@playwright/test' ↓
cause @playwright/test is not installed or version is too old.
fix
Install with: npm install -D @playwright/test@latest
error Error: Cannot find module 'tronscan-test-mcp' ↓
cause tronscan-test is not installed globally or locally.
fix
Run: npx tronscan-test init or install globally with: npm install -g tronscan-test
error Error: Failed to launch browser: Executable doesn't exist at ... ↓
cause Playwright browsers not installed.
fix
Run: npx playwright install chromium
error Error: @playwright/test version 1.4x is not supported. Required >=1.56.0 ↓
cause Incompatible Playwright version.
fix
Update Playwright: npm install -D @playwright/test@latest
Warnings
gotcha @playwright/test version must be >=1.56.0 for compatibility with tronscan-test. ↓
fix Run: npm install -D @playwright/test@latest
gotcha The 'mcp' command must be run from the project root; otherwise MCP server may not find test configuration. ↓
fix Always run `npx tronscan-test-mcp` from the directory where `tronscan-test init` was executed.
deprecated Using `npx tronscan-test mcp` instead of `npx tronscan-test-mcp` is deprecated as of v1.4.0. ↓
fix Use `npx tronscan-test-mcp` for MCP server.
gotcha Headed mode (--headed) may fail in CI environments without a display server. ↓
fix Use Xvfb or run headlessly in CI.
gotcha Test initialization creates a directory; avoid running over existing projects. ↓
fix Run init in an empty directory or use a new folder name.
Install
npm install tronscan-test yarn add tronscan-test pnpm add tronscan-test Imports
- default export (CLI) wrong
npm run tronscan-testcorrectnpx tronscan-test test - MCP Server wrong
npx tronscan-test mcpcorrectnpx tronscan-test-mcp - Playwright fixtures (if used) wrong
import { test, expect } from 'tronscan-test'correctimport { test, expect } from '@playwright/test'
Quickstart
npx tronscan-test init my-tests && cd my-tests && npm install -D @playwright/test typescript @types/node && npx playwright install chromium && npx tronscan-test test