LunarLink
Platform introduction
Interface automation testing platform based on HttpRunner + Django + Vue + Element UI, available for production.
Also, thank you so much cauliflower. Without AnotherFasterRunner there would be no LunarLink :)
technology stack
Function module
- Login: account authentication, user management, permission management
- Project management: Add new projects, list display and related operations, support project dashboard, display project data in different dimensions on a daily, weekly and monthly basis
- Project overview: basic project information, API, test cases, task execution overview, daily details
- Interface management: An API corresponds to an HTTP interface on the back end. The API can be run alone or as a use case step. It supports API grouping, parameter extraction, data assertion, variable reference, front and rear hook functions, interface debugging, and log display.
- Interface import: supports synchronized YApi (using YApi as a medium to indirectly support Swagger, Postman, and Har), no need to manually enter the interface
- Test cases: Support group management, composed of multiple APIs, support dynamic parameter transfer of associated interfaces, do not distinguish between scenario use cases and single interface use cases, support synchronous and asynchronous batch execution, and generate test reports
- Traffic recording: In order to adapt to the interface test scenario of complex processes, open the browser and perform a series of operations to get a test case. The parameters between different interfaces are automatically extracted and associated.
- Configuration management: Customize request base_url addresses with different configurations, public request header parameters, local variables, pre- and post-hook functions, and parameterized content. APIs and use cases can be executed in different configurations.
- Global variables: Define variables for API use. Variable values can also refer to functions in the driver code. General accounts and keys can be defined here.
- Driver code: Supports Python scripts, defining front and rear hook functions and auxiliary functions to easily implement functions such as request parameter signature, encryption and decryption of responses, etc.
- Scheduled tasks: Scheduled tasks can be set up, follow crontab expressions, and can be turned on and off online. Use case execution supports serial and parallel execution. After completion, the test report is pushed to the enterprise WeChat
- Historical reports: Save different types of test reports such as timing, debugging, asynchronous, etc., which can be viewed, filtered, deleted online, and other people's test reports can also be viewed
Preparation
Python >= 3.9.5 (推荐3.9.x版本)
nodejs >= 16.0 (推荐最新)
Mysql >= 5.7.0 (推荐5.7.x版本)
RabbitMQ >= 3.x-management(默认需要,推荐最新版)
Redis >= 6.2.6
Frontend ♝
It is recommended to use yarn. The project provides yarn.lock
. Using other package managers is prone to version dependency issues.
# 克隆项目
git clone https://github.com/tahitimoon/LunarLink.git
# 进入项目目录
cd LunarLink/frontend
# 安装依赖
yarn install --registry=https://registry.npmmirror.com
# 启动服务
yarn start
# 浏览器访问 http://127.0.0.1:8888
# config/index.js 文件可配置启动端口等参数
# config/dev.env.js 文件可配置后端接口地址
# config/prod.env.js 文件保持不变
# 构建生产环境
# yarn build
rear end?
# 克隆项目
git https://github.com/tahitimoon/LunarLink.git
# 进入项目目录
cd LunarLink/backend
# 将.env.example文件重命名为.env 并配置相关参数
mv .env.example .env
# 安装依赖环境
pip3 install -r requirements.txt
# 执行迁移命令:
python3 manage.py makemigrations
python3 manage.py migrate
# 创建管理员用户
python3 manage.py createsuperuser
# 启动项目
python3 manage.py runserver
# 开启流量录制代理
python3 proxy.py
Visit project
# 登录管理后台,设置账号姓名
http://127.0.0.1:8000/admin/
# 浏览器打开
http://127.0.0.1:8888
用户/密码:管理员用户/密码
# 接口文档地址
http://127.0.0.1:8000/swagger/
Enable scheduled/asynchronous tasks
# 启动celery,在控制台执行
celery -A backend worker -B --loglevel=info
Demo picture✅
Docker build
Please refer to the documentation Docker build