{"id":13625065,"url":"https://github.com/tahitimoon/LunarLink","last_synced_at":"2025-04-16T06:31:49.099Z","repository":{"id":228353737,"uuid":"773744122","full_name":"tahitimoon/LunarLink","owner":"tahitimoon","description":"一个基于 HttpRunner + Django + Vue + Element UI 的接口自动化测试平台，生产可用。","archived":false,"fork":false,"pushed_at":"2024-07-14T15:08:03.000Z","size":13498,"stargazers_count":343,"open_issues_count":2,"forks_count":50,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-05T07:02:23.520Z","etag":null,"topics":["autotest","django","django-rest-framework","element-ui","httprunner","vue","vue2"],"latest_commit_sha":null,"homepage":"https://lunar-link-docs.fun","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tahitimoon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-18T10:18:31.000Z","updated_at":"2024-11-04T12:01:34.000Z","dependencies_parsed_at":"2024-07-14T07:28:56.076Z","dependency_job_id":"5a1e54dd-03e6-4d78-9472-622b1eaad610","html_url":"https://github.com/tahitimoon/LunarLink","commit_stats":null,"previous_names":["tahitimoon/lunarlink"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahitimoon%2FLunarLink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahitimoon%2FLunarLink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahitimoon%2FLunarLink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahitimoon%2FLunarLink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tahitimoon","download_url":"https://codeload.github.com/tahitimoon/LunarLink/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223700204,"owners_count":17188267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autotest","django","django-rest-framework","element-ui","httprunner","vue","vue2"],"created_at":"2024-08-01T21:01:50.399Z","updated_at":"2025-04-16T06:31:49.080Z","avatar_url":"https://github.com/tahitimoon.png","language":"Python","funding_links":[],"categories":["接口管理","Python"],"sub_categories":[],"readme":"# LunarLink\n[![GitHub License](https://img.shields.io/github/license/tahitimoon/LunarLink?color=yellow)](https://github.com/tahitimoon/LunarLink/blob/main/LICENSE)\n[![GitHub Release](https://img.shields.io/github/v/release/tahitimoon/LunarLink)](https://github.com/tahitimoon/LunarLink/releases)\n[![GitHub Repo stars](https://img.shields.io/github/stars/tahitimoon/LunarLink)](https://github.com/tahitimoon/LunarLink/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/tahitimoon/LunarLink)](https://github.com/tahitimoon/LunarLink/fork)\n[![Python Version](https://img.shields.io/badge/Python-%3E%3D3.9.5-green)](https://python.org/)\n[![Django Version](https://img.shields.io/badge/Django-3.2-blue)](https://docs.djangoproject.com/zh-hans/3.2/)\n[![Static Badge](https://img.shields.io/badge/Node-%3E%3D16.0.0-brightgreen)](https://nodejs.org/en)\n\n\n## 平台简介\n\n基于HttpRunner + Django + Vue + Element UI 的接口自动化测试平台，生产可用。\n\n此外，非常感谢 [花菜](https://github.com/lihuacai168)。没有 AnotherFasterRunner 就不会有 LunarLink :)\n\n## 技术栈\n\n- [x]  🎨 Django\n- [x]  🎶 Django Rest framework\n- [x]  🎉 Vue.js\n- [x]  🎃 Element UI\n- [x] 🏐 django-celery-beat（定时任务）\n- [x]  🎲 Nginx（反向代理，https配置等）\n- [x] 👟 HttpRunner（测试用例执行引擎）\n- [x]  🔒 RabbitMQ\n- [x]  🚚 Redis\n- [x]  💎 MySQL\n- [x] ⛏ Docker\n\n## 功能模块\n\n- 登录：账号认证、用户管理、权限管理\n- 项目管理：新增项目、列表展示及相关操作，支持项目看板，显示项目每日、每周、每月不同维度数据\n- 项目概览：项目基本信息，API、测试用例、任务执行总览，每日明细\n- 接口管理：一个API对应后端一个HTTP接口，API可以单独运行，也可以作为一个用例步骤，支持API分组、参数提取、数据断言、变量引用、前后置钩子函数、接口调试、日志显示\n- 接口导入：支持同步YApi （以YApi 做媒介间接支持Swagger、Postman、Har），无需手动录入接口\n- 测试用例：支持分组管理，由多个API组成，支持关联接口的动态参数传递，不区分场景用例和单接口用例，支持同步、异步批量执行，生成测试报告\n- 流量录制：为了适配复杂流程的接口测试场景，打开浏览器，进行一系列操作，就可以得到一个测试用例，不同接口之间的参数自动提取并关联\n- 配置管理：自定义不同配置的请求base_url地址，公共请求头参数、局部变量、前后置钩子函数、参数化内容，API和用例可以选择不同配置执行\n- 全局变量：定义变量供API使用，变量值也可以引用驱动代码中的函数，通用账号、秘钥可以定义在此处\n- 驱动代码：支持Python脚本，定义前后置钩子函数、辅助函数可以轻松实现请求参数签名，加密和解密响应等功能\n- 定时任务：可设置定时任务，遵循crontab表达式，可在线开启、关闭，用例执行支持串行、并行，完成后测试报告推送企业微信\n- 历史报告：保存定时、调试、异步等不同类型的测试报告，可在线查看、筛选、删除，还可查看他人测试报告\n\n##  准备工作\n\n```\nPython \u003e= 3.9.5 (推荐3.9.x版本)\nnodejs \u003e= 16.0 (推荐最新)\nMysql \u003e= 5.7.0 (推荐5.7.x版本)\nRabbitMQ \u003e= 3.x-management(默认需要，推荐最新版)\nRedis \u003e= 6.2.6\n```\n\n##  前端 ♝\n\n建议使用yarn，项目提供了`yarn.lock`，使用其他包管理器，容易出现版本依赖问题。\n\n```bash\n# 克隆项目\ngit clone https://github.com/tahitimoon/LunarLink.git\n\n# 进入项目目录\ncd LunarLink/frontend\n\n# 安装依赖\nyarn install --registry=https://registry.npmmirror.com\n\n# 启动服务\nyarn start\n# 浏览器访问 http://127.0.0.1:8888\n# config/index.js 文件可配置启动端口等参数\n# config/dev.env.js 文件可配置后端接口地址\n# config/prod.env.js 文件保持不变\n# 构建生产环境\n# yarn build\n```\n\n##  后端 💈\n\n```bash\n# 克隆项目\ngit https://github.com/tahitimoon/LunarLink.git\n\n# 进入项目目录\ncd LunarLink/backend\n\n# 将.env.example文件重命名为.env 并配置相关参数\nmv .env.example .env\n\n# 安装依赖环境\npip3 install -r requirements.txt\n\n# 执行迁移命令：\npython3 manage.py makemigrations\npython3 manage.py migrate\n\n# 创建管理员用户\npython3 manage.py createsuperuser\n\n# 启动项目\npython3 manage.py runserver\n\n# 开启流量录制代理\npython3 proxy.py\n```\n\n##  访问项目\n\n```bash\n# 登录管理后台，设置账号姓名\nhttp://127.0.0.1:8000/admin/\n\n# 浏览器打开\nhttp://127.0.0.1:8888\n用户/密码:管理员用户/密码\n\n# 接口文档地址\nhttp://127.0.0.1:8000/swagger/\n```\n\n## 开启定时/异步任务\n\n```bash\n# 启动celery，在控制台执行\ncelery -A backend worker -B --loglevel=info\n```\n\n##  演示图 ✅\n\n![](screenshots/1.png)\n\n![](screenshots/2.png)\n\n![](screenshots/3.png)\n\n![](screenshots/4.png)\n\n![](screenshots/5.gif)\n\n##  Docker构建\n请参考文档[Docker构建](deployment/README.md)\n\n##  鸣谢\n感谢 [Chat2Report](https://ch2report.com/) 友情赞助\n\n##  版权信息\n本项目签署了MIT 授权协议，详情请参阅 [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftahitimoon%2FLunarLink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftahitimoon%2FLunarLink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftahitimoon%2FLunarLink/lists"}