# ApiPlat **Repository Path**: kerici/api-plat ## Basic Information - **Project Name**: ApiPlat - **Description**: 接口测试平台 拥有环境管理、接口文档管理、接口用例管理、批量执行接口用例,无人值守自动化测试接口,生成接口测试报告,发送企业微消息 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 1 - **Created**: 2021-10-13 - **Last Updated**: 2025-04-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ApiPlat #### 介紹 接口自动化测试平台 集中管理用例,定时无人值守,三方触发调度,接口文档管理,MOCK接口 #### 架構 前后端分离 前端:环境、接口、用例、计划、报告管理页面 后端:管理层、数据模型层、数据IO层、执行管理层、核心驱动层、扩展方法层等 分享的源码不支持权限控制 #### 安裝教程 一、后端安装配置: 代码环境 python3.6 + 1、依赖库: pip3 install django pip3 install requests pip3 install openpyxl pip3 install pymysql pip3 install jsonpath pip3 install djangorestframework pip3 install django-cors-headers pip3 install rsa pip3 install apscheduler pip3 install pymssql 2、mysql配置: 在已有mysql环境里添加一个空库(没有Mysql环境先自行安装一个) 在目录/autoplat/autoplat/下找到settings.py文件,这是django的原装配置文件,配置数据库 找到DATABASES DATABASES = { # 'default': { # 'ENGINE': 'django.db.backends.sqlite3', # 'NAME': BASE_DIR / 'db.sqlite3', # # } 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'autoplat', #数据为名称 'USER': 'root', #数据库账号 'PASSWORD': 'qwer1234', #数据库密码 'HOST': '192.168.0.188', #数据库服务器ip 'PORT': '3306' #数据库端口,默认3306,没改过都3306 } } 配置好后,保存 3、初始化数据库 window进入命令模式,linux直接敲命令, 命令模式下找到主目录/autoplat/,输入两条命令 python manage.py makemigrations python manage.py migrate 输入成功后,数据库表初始化完成 4、运行: 在主目录/autoplat/下,输入运行命令 python manage.py runserver 一般本地运行都是http://127.0.0.1:8000 二、前端安装配置 npm + vue CLI (都安装最新版的就好) 1、在platview目录下安装依赖: 进入命令模式,找到前端主目录/platview/输入命令安装依赖 npm install 2、前端配置接口域名 找到文件/platview/src/network/request.js 修改这条语句: export var baseUrl = 'http://127.0.0.1:8000/autoplat' //http://127.0.0.1:8000 这是域名是后端运行起来的。请按照实际给 2、配置完成后,运行 npm run serve #### 使用說明 1. xxxx 2. xxxx 3. xxxx #### 參與貢獻 1. Fork 本倉庫 2. 新建 Feat_xxx 分支 3. 提交程式碼 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 來支持不同的語言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方部落格 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 這個地址來瞭解 Gitee 上的優秀開源項目 4. [GVP](https://gitee.com/gvp) 全稱是 Gitee 最有價值開源項目,是綜合評定出的優秀開源項目 5. Gitee 官方提供的使用手冊 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一檔用來展示 Gitee 會員風采的欄目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)