# xiaolin_platform **Repository Path**: talon89/xiaolin_platform ## Basic Information - **Project Name**: xiaolin_platform - **Description**: No description available - **Primary Language**: Unknown - **License**: OSL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-10-11 - **Last Updated**: 2024-10-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #自动化测试平台 #### 介绍 一、背景 背景:从零搭建开发环境和部署应用 技术定位:测开 目标群体:测试人员 技术应用场景:基于现有测试平台合作开发模式 整体思路:简要描述技术应用的整体思路和逻辑 #### 软件架构 python 3.11 node 18.16.0 npm 9.7.1 mysql 8.0 JDK 1.8 SDK版本 6-13 IDE: pycharm 2021.1.1 #### 安装教程 2.1 准备工作 准备工作一【部署环境和流程目录】 git clone 项目到本地环境 安装后端依赖:pycharm控制台执行:pip install requirements.txt 安装python第三方库 安装前端依赖:控制台执行: cd lapi_vue, npm 更换镜像源安装cnpm(网上寻找即可),cnpm install, "等待安装前端依赖" 启动项目:前端启动:npm run dev;服务端启动:python manage.py runserver ip:port 准备工作二 【问题依赖解决方案】 执行pip install requirement.txt遇到无法安装问题,建议将对应版本剔除文本,然后直接通过pycharm工具直接下载对应的三方库 前端依赖遇到的问题,统一优先解决方案: 1、安装NVM操作NODEJS版本 2、移除NODE_OPTIONS:打开package.json文件,找到scripts.dev字段,去掉SET NODE_OPTIONS=--openssl-legacy-provider这一行,仅保留vue-cli-service serve --open即可。重启开发服务器。 3、进入前端项目目录,执行:cnpm install webpack@4 4、cnpm -i 5、npm run build:prod 6、npm run dev【启动前端】 数据库部署流程: 1、本地电脑安装相关mysql数据库,配置好端口和账号密码等,新建一个库用于存放用户数据库密码 2、修改L_API文件夹下的settings.py文件,修改本地mysql配置的新数据库表和账号端口等,另外在ALLOWED_HOSTS新增本地地址 3、新建migrations文件夹到lapi_app目录,修改lapi_vue下的src/api/common.js中的【// 本地环境 export const host = "http://172.24.6.10:9090"】--改成自己的本地IP地址 4、然后执行下列重新生成数据库表 python manage.py makemigrations python manage.py migrate 5、创建数据库表对应账号用于登录(先手动执行一下sql): INSERT INTO xiaolin_platform.django_app_role (role_type, role_name, create_time, update_time) values (1, "超管", "2023-03-20 14:30:00", "2023-03-20 14:30:00"); INSERT INTO xiaolin_platform.django_app_role_user (create_time, update_time, role_id, user_id) VALUES("2023-03-20 14:30:00", "2023-03-20 14:30:00", 1, 1); INSERT INTO xiaolin_platform.django_app_userinfo (account, username, password, token, token_time, create_time, update_time) VALUES ("admin1", "admin1", "e10adc3949ba59abbe56e057f20f883e", "xxx", "2023-03-20 14:30:00", "2023-03-20 14:30:00", "2023-03-20 14:30:00"); INSERT INTO xiaolin_platform.django_app_api_script_menu (label, pid, `type`, create_time, update_time, api_script_id, project_id, user_id) VALUES('根目录', 0, 0, '2024-07-19 11:58:24.081997', '2024-07-19 11:58:24.081997', NULL, 1, 1); INSERT INTO xiaolin_platform.django_app_app_menu (label, pid, `type`, create_time, update_time, user_id) VALUES('根目录', 0, 1, '2023-06-26 18:08:53.345950', '2023-06-26 18:07:57.823130', 1); INSERT INTO xiaolin_platform.django_app_menu (label, pid, `type`, m_user_id, testcase_id, ui_id) VALUES('根目录', 0, 0, 1, NULL, NULL); INSERT INTO xiaolin_platform.django_app_permission (label, permission_url, parent_id, `type`, create_time, update_time, user_id) VALUES('权限列表', NULL, 0, 0, '2024-03-12 14:37:47', '2024-03-12 14:37:47', 1); INSERT INTO xiaolin_platform.django_app_web_menu (label, pid, `type`, create_time, update_time, user_id) VALUES('根目录', 0, 0, '2024-01-01 00:00:00', '2024-01-01 00:00:00', 1); INSERT INTO xiaolin_platform.django_app_web_pytest_menu (label, pid, user_id) VALUES('根目录', 0, 1); INSERT INTO xiaolin_platform.django_app_web_ui_menu (label, pid, `type`, create_time, update_time, user_id) VALUES('根目录', 0, 0, '2024-07-03 18:21:16.882028', '2024-07-03 18:21:16.882028', 1); INSERT INTO xiaolin_platform.django_app_api_service (service_name, service_img, create_time, update_time, project_id, user_id, status) VALUES('account', '', '2024-05-11 00:00:00', '2024-05-11 00:00:00', 1, 1, 1); INSERT INTO xiaolin_platform.django_app_api_menu (label, pid, `type`, create_time, update_time, api_id, api_case_id, service_id, user_id, status) VALUES('xxxxxxx', 0, 0, '2024-07-19 11:58:24.081997', '2024-07-19 11:58:24.081997', NULL, NULL, 1, 1, 1); 启动后端:python manage.py runserver ip:port,用本地IP地址和前端common.js中的端口 #### 使用说明 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/)