API测试自动化服务器

一个基于Postman Collection的API测试自动化服务器,支持多种AI模型环境,用于管理、执行和跟踪API测试用例。

  • by foxywolf-hub
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 foxywolf-hub/mcp-server1

使用说明

MCP服务器(模型上下文协议)

在AI Host(Claude,OpenAI,用户开发)中通用的Model Context Protocol(MCP)服务器。

项目概述

该项目提供了一个基于Postman Collection的API测试自动化服务器,可在各种AI主机环境中使用。用户上传Postman Collection、Environment和Data json文件后,可以将其保存到SQLite DB并运行测试。

主要功能

  • Postman Collection,Environment,Data json文件上传和管理
  • 运行API测试案例并跟踪结果
  • 管理测试集合
  • 支持多种AI模型(Claude、OpenAI、用户开发模型)

技术堆栈

  • 后端:Python、FastAPI
  • 数据库:SQLite
  • 包管理:紫外线
  • 服务器环境:本地HTTPS服务器(端口8610)

如何安装和运行

必要条件

  • Python 3.10或更高版本
  • uv包管理器

设置

# 저장소 클론
git clone https://github.com/foxywolf-hub/mcp-server1.git
cd mcp-server1

# 의존성 설치
uv pip install -r requirements.txt

运行

# 서버 실행
python main.py

服务器https://localhost:8610在中运行。

项目结构

mcp-server1/
├── app/                    # 애플리케이션 코드
│   ├── api/                # API 라우트
│   ├── core/               # 코어 설정
│   ├── db/                 # 데이터베이스 관련
│   ├── models/             # 데이터 모델
│   ├── schemas/            # Pydantic 스키마
│   ├── services/           # 비즈니스 로직
│   └── utils/              # 유틸리티 함수
├── certs/                  # HTTPS 인증서
├── tests/                  # 테스트 코드
├── main.py                 # 애플리케이션 진입점
├── requirements.txt        # 의존성 목록
└── README.md               # 프로젝트 설명

数据库结构

主表

  • api_info:API基本信息
  • api_test_case:API测试案例
  • api_test_data:测试数据
  • api_test_collection:测试集合
  • collection_test_case:连接集合和测试案例
  • api_test_run:测试运行历史记录
  • api_test_result:测试结果
  • user:用户信息