npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aico-test-mcp

v1.1.0

Published

智能软件星工厂的自动化测试MCP服务 - 支持动态测试用例生成和执行

Readme

intention-test - 智能软件星工厂自动化测试服务

基于 TypeScript 的智能软件星工厂 MCP 测试服务,提供完整的 Playwright 自动化测试能力,支持动态测试用例生成和执行,专为 Web 应用系统设计。

🌟 关键特性

  • 🏗️ 标准TS工程 - 完整基于mcp项目的TypeScript架构
  • 🚀 通用测试 - 适用于各类Web系统的测试工具
  • 🧠 AI智能生成 - 基于需求自动生成测试用例
  • 🔍 工作区智能 - 自动检测项目环境和测试配置
  • 📊 专业报告 - 完整的HTML测试报告和分析

🚀 快速开始

⚙️ 环境要求

  • Node.js >=20.20.2
  • pnpm >=8.15.0
  • Playwright >=1.42.0

安装配置

pnpm install

启动服务

# 开发模式(即时TS编译)
pnpm run dev

# 构建生产版本
pnpm run build
pnpm start

🛠️ 核心工具

1. 接口测试执行智能体

{
  "tool": "接口测试执行智能体",
  "url": "https://api.example.com/users",
  "method": "GET",
  "headers": {"Authorization": "Bearer token"},
  "query": {"page": "1"}
}

2. 创建测试计划智能体

{
  "tool": "创建测试计划智能体",
  "planName": "用户管理测试计划",
  "tasks": [
    {
      "name": "创建用户",
      "method": "POST",
      "url": "https://api.example.com/users",
      "body": {"name": "test", "email": "[email protected]"},
      "hopeRes": "成功创建用户"
    }
  ]
}

3. 获取测试计划智能体

{
  "tool": "获取测试计划智能体",
  "uuid": "optional-plan-uuid"
}

4. 执行测试计划智能体

{
  "tool": "执行测试计划智能体",
  "uuid": "test-plan-uuid"
}

5. 测试用例执行智能体 (Playwright)

{
  "tool": "测试用例执行智能体",
  "testCase": "用户登录功能测试",
  "projectRoot": "/path/to/project",
  "baseUrl": "https://example.com",
  "browserType": "chromium",
  "headless": false
}

6. 测试脚本生成智能体

{
  "tool": "测试脚本生成智能体",
  "testCase": "测试用户登录功能。步骤:1. 打开登录页面 2. 输入用户名'admin'和密码'123456' 3. 点击登录按钮。期望结果:成功跳转到首页并显示欢迎信息。",
  "projectRoot": "/path/to/project",
  "baseUrl": "https://example.com",
  "browserType": "chromium",
  "headless": true
}

📂 项目架构

test-mcp/
├── src/                    # 核心TypeScript源码
│   ├── index.ts           # MCP服务入口
│   ├── server/            # MCP工具实现
│   │   ├── api-test/                     # API测试工具
│   │   ├── create-test-plan/             # 创建测试计划工具
│   │   ├── get-test-plans/               # 获取测试计划工具
│   │   ├── execute-test-plan/            # 执行测试计划工具
│   │   ├── add-tasks-to-plan/            # 添加任务到计划工具
│   │   ├── batch-update-task-summaries/  # 批量更新任务摘要工具
│   │   ├── update-task/                  # 更新任务工具
│   │   ├── export-test-results/          # 导出测试结果工具
│   │   └── playwright-test-generator/    # Playwright测试生成器
│   ├── db/                # JSON数据库实现
│   │   ├── db.ts          # 数据库操作
│   │   └── schema.ts      # 数据结构定义
│   └── utils/             # 通用工具函数
├── tests/                 # 测试文件和示例
├── data/                  # JSON数据库文件(运行时创建)
└── dist/                 # 编译后的JavaScript输出

🎯 支持的测试类型

API 测试

  • RESTful API接口测试
  • 请求/响应验证
  • 状态码检查
  • 响应时间监控

Web UI 测试

  • 页面导航测试
  • 表单填写和提交
  • 元素交互测试
  • 视觉验证测试

数据库测试

  • 数据一致性验证
  • CRUD操作测试
  • 事务处理测试

🔧 开发优势

| 架构模式 | 优势 | |---|---| | TypeScript | 完整的类型安全、智能提示 | | 模块化 | 遵循单一职责原则的高可维护性 | | 标准工具链 | 与mcp项目100%兼容的构建系统 | | 测试规范 | 统一的Playwright最佳实践 |

🤝 贡献指南

我们欢迎并感谢所有贡献!以下是参与贡献的指南:

代码提交

  • 使用清晰的提交信息
  • 遵循项目现有的代码风格

分支策略

  • main - 稳定发布分支
  • develop - 主要开发分支
  • feature/* - 新功能开发分支
  • fix/* - 问题修复分支

测试要求

  • 所有新功能必须包含对应的测试用例
  • 修改现有代码必须确保所有测试通过
  • 运行 pnpm test 验证所有测试

🎛️ MCP集成示例

{
  "mcpServers": {
    "playwright-test": {
      "command": "node",
      "args": ["dist/index.js"]
    }
  }
}

📊 命令指南

# 构建项目
pnpm run build               # TypeScript→JavaScript

# 测试执行
pnpm run test                # 运行单元测试
pnpm run test:run            # 运行测试(单次)
pnpm run test:ui             # 在UI模式下运行测试
pnpm run test:coverage       # 运行测试并生成覆盖率报告

# 开发工具
pnpm run dev                 # 热重载开发模式

🎯 技术特色

  • 灵活配置: 支持多种Web系统的测试配置
  • AI增强: 基于业务描述的自动测试生成
  • 标准化: 完全符合Playwright官方规范
  • 可扩展: 轻松添加新模块和测试类型