Skip to main content

Test-Agent: Docker-based Test Execution System

Project description

Test-Agent 测试平台子系统

版本: v2.0.4
状态: 已发布 (PyPI)


一、项目定位

Test-Agent 是独立的测试平台子系统,为 oc-collab 和 PM-Agent 提供隔离的测试环境。

1.1 核心能力

能力 说明
独立测试数据库 隔离生产数据
多Agent互动测试 多进程真实Agent通信
动态测试项目 支持任意类型项目
版本自动注册 与conf-man集成,自动注册测试版本
Docker测试执行 强制在Docker内运行测试
测试报告生成 生成标准化测试报告

1.2 技术架构

组件 技术
CLI框架 Click
数据库 SQLite
测试执行 Docker容器
版本集成 REST API (conf-man)

二、安装

2.1 PyPI安装(推荐)

pip install oc-test-agent

2.2 验证安装

test-agent --version
# 输出: test-agent, version 2.0.4

2.3 开发模式安装

# 克隆项目
git clone https://gitee.com/zhang-xiuqin01/test-agent.git
cd test-agent

# 开发模式安装
pip install -e .

三、快速开始

3.1 初始化环境

test-agent init

3.2 基本使用

# 项目管理
test-agent project create --id test_project --name "测试项目"
test-agent project list

# Agent管理
test-agent agent register --id test_agent1 --name "测试Agent"
test-agent agent status

# 测试执行
test-agent run --project test_project --agents test_agent1 --commands "pytest"

# 清理数据
test-agent cleanup --project test_project

四、CLI命令

4.1 主要命令

命令 说明
test-agent execute 在Docker容器内执行测试
test-agent build 构建Docker测试镜像
test-agent query 查询历史测试结果
test-agent report 生成测试报告
test-agent cancel 取消正在执行的测试
test-agent cleanup 清理历史测试数据
test-agent init 初始化测试环境

4.2 项目管理

命令 说明
test-agent project create 创建测试项目
test-agent project list 列出所有项目
test-agent project delete 删除测试项目

4.3 Agent管理

命令 说明
test-agent agent register 注册测试Agent
test-agent agent status 查看Agent状态
test-agent agent unregister 注销Agent

五、版本集成 (v2.0)

5.1 自动注册测试

# 执行测试并自动注册版本
test-agent execute \
    --project my-project \
    --version v2.0.4 \
    --auto-register \
    --manifest version_manifest.yaml

5.2 生成测试报告

# 执行测试并生成报告
test-agent execute \
    --project my-project \
    --version v2.0.4 \
    --test-type unit \
    --auto-register

六、目录结构

test-agent/
├── src/                    # 源代码
│   ├── cli/               # CLI命令
│   ├── core/              # 核心模块
│   ├── db/                # 数据库
│   ├── models/            # 数据模型
│   └── utils/             # 工具类
├── tests/                 # 测试用例
├── docs/                  # 项目文档
│   ├── 01-requirements/
│   ├── 02-design/
│   ├── 03-reviews/
│   └── 06-roadmap/
├── state/                 # 测试状态数据
├── config/                # 配置文件
└── pyproject.toml         # 项目配置

七、相关文档

  • 需求文档: docs/01-requirements/
  • 设计文档: docs/02-design/
  • 发布记录: docs/03-reviews/
  • 路线图: docs/06-roadmap/
  • oc-collab主项目: ../dual-agent-collaboration-system
  • PM-Agent项目: ../pm-agent

八、PyPI发布


作者: oc-collab团队
维护者: test-agent团队
创建日期: 2026-02-18
更新日期: 2026-02-22

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oc_test_agent-2.0.5.tar.gz (46.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oc_test_agent-2.0.5-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file oc_test_agent-2.0.5.tar.gz.

File metadata

  • Download URL: oc_test_agent-2.0.5.tar.gz
  • Upload date:
  • Size: 46.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for oc_test_agent-2.0.5.tar.gz
Algorithm Hash digest
SHA256 f18014af06a04e675edf1cfd7313d402871235fd8a3560bee405e29e265c7f17
MD5 4c51b2e02b970dbc8a95d469e7439033
BLAKE2b-256 54a876cf2f7e6d7c953bcd82cba27f9e0ef5a447600dddf9b78bb6544265e44a

See more details on using hashes here.

File details

Details for the file oc_test_agent-2.0.5-py3-none-any.whl.

File metadata

  • Download URL: oc_test_agent-2.0.5-py3-none-any.whl
  • Upload date:
  • Size: 39.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for oc_test_agent-2.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4d6907dbcb4e9e3f073a391a5a68a58a5c8bc872236830f35ac6d34daf0a8e3c
MD5 e0a1bda55e587c9c88340019f1cc0afe
BLAKE2b-256 5dc0ba20476f9e7df6ae0554b6c99d3dd1f62d4f7d826dac5a553a4bc54f836c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page