A modern, high-performance automated UI testing framework for Node.js 22+.
testring is a testing framework designed for automated testing of web applications. It provides:
- ๐ High Performance โ Multi-process parallel test execution
- ๐ง Extensible โ Rich plugin system architecture
- ๐ Multi-Browser โ Chrome, Firefox, Safari, and Edge via Playwright
- ๐ ๏ธ Developer Friendly โ ESM-first, TypeScript-native, complete development toolchain
testring/
โโโ core/ # Core modules (~20 packages) โ Framework foundation
โ โโโ api/ # Test API controllers
โ โโโ cli/ # Command-line interface (citty)
โ โโโ logger/ # Distributed logging system
โ โโโ transport/ # Inter-process communication
โ โโโ test-worker/ # Test worker processes
โ โโโ reporter/ # Test result reporting
โ โโโ ... # Other core modules
โโโ packages/ # Extension packages โ Plugins and tools
โ โโโ plugin-playwright-driver/ # Playwright browser driver
โ โโโ plugin-babel/ # Babel transpilation plugin
โ โโโ plugin-fs-store/ # File system store plugin
โ โโโ web-application/ # Web application testing
โ โโโ devtool-frontend/ # Developer tools frontend
โ โโโ ... # Other extension packages
โโโ docs/ # Documentation
โโโ utils/ # Build and maintenance utilities
โโโ README.md
Core modules provide the framework's foundational functionality:
- API Layer โ Test execution and control interfaces
- CLI โ Command-line interface built with citty (subcommands:
run,init,plugin) - Process Management โ Multi-process test execution and communication
- File System โ Test file discovery and reading
- Logging System โ Distributed logging and management
- Plugin System โ Extensible plugin architecture
- Reporter โ Test result reporting and output formatting
Extension packages provide additional functionality:
- Playwright Driver โ Browser automation via Playwright
- Babel Plugin โ Test file transpilation
- FS Store โ File system storage for test artifacts
- Web Application โ Web application-specific testing features
- Developer Tools โ Debugging and monitoring tools
- Node.js 22 or later
- pnpm 10+
# Install the main framework
pnpm add testring
# Install Playwright driver
pnpm add @testring/plugin-playwright-driver
# Optional: Babel plugin for transpilation
pnpm add @testring/plugin-babel
# Optional: File system store
pnpm add @testring/plugin-fs-storeCreate a .testringrc configuration file (JSON):
{
"tests": "./tests/**/*.spec.js",
"plugins": [
"@testring/plugin-playwright-driver"
],
"workerLimit": 2,
"retryCount": 3
}Or use .testringrc.js / .testringrc.cjs for JavaScript configuration:
// .testringrc.js
export default {
tests: './tests/**/*.spec.js',
plugins: ['@testring/plugin-playwright-driver'],
workerLimit: 2,
retryCount: 3,
};// tests/example.spec.js
describe('Example Test', () => {
it('should be able to access the homepage', async () => {
await browser.url('https://example.com');
const title = await browser.getTitle();
expect(title).toBe('Example Domain');
});
});# Run all tests
testring run
# Run specific tests
testring run --tests "./tests/login.spec.js"
# Set parallel execution
testring run --workerLimit 4
# Debug mode
testring run --logLevel debug- Run multiple tests simultaneously across isolated worker processes
- Intelligent load balancing
- Process isolation prevents test interference
- Chrome, Firefox, Safari, Edge
- Headless mode support
- Mobile browser emulation
- Official plugins for common use cases
- Simple plugin development API (
@testring/plugin-api) - Composable plugin architecture
- Visual debugging interface
- Real-time test monitoring
- Detailed test reports
# Clone the project
git clone https://github.com/danbao/testring.git
cd testring
# Install dependencies
pnpm install
# Build the project
pnpm run build:main
# Run unit tests
pnpm run test:unit
# Run all tests (unit + E2E headless)
pnpm test# Full build (all packages, uses turbo)
pnpm run build
# Build main packages only (excludes e2e, devtool)
pnpm run build:main# Unit tests (vitest)
pnpm run test:unit
# Unit tests in watch mode
pnpm run test:unit:watch
# Unit tests with coverage
pnpm run test:unit:coverage
# E2E tests with coverage
pnpm run test:e2e:coverage:lcov# Lint all files (eslint)
pnpm run lint
# Auto-fix lint issues
pnpm run lint:fixContributions are welcome! Please follow these steps:
- Fork the project
- Create a feature branch
- Submit your changes
- Create a Pull Request
MIT License โ See the LICENSE file for details.
- ๐ Documentation
- ๐ Issue Reporting
- ๐ฌ Discussions
่ฟไธช้กน็ฎๅ ๅซไธไธช็ฌ็ซ็ Cloudflare Worker๏ผๆไพๅจ็บฟๆต่ฏ็ฏๅข๏ผ
cloudflare-worker/
โโโ build.js # ๆๅปบ่ๆฌ
โโโ wrangler.toml # Worker ้
็ฝฎ
โโโ package.json # ไพ่ต็ฎก็
โโโ static-fixtures/ # ๆต่ฏ้กต้ขๆบๆไปถ (24ไธช)
โโโ worker.js # ็ๆ็ไปฃ็ (gitignored)
โโโ README.md # ่ฏฆ็ปๆๆกฃ
cd cloudflare-worker
pnpm install
pnpm run build
pnpm run deploy่ฏฆ็ปไฟกๆฏ่ฏทๆฅ็ cloudflare-worker/README.md