{"id":13625798,"url":"https://github.com/githublitao/api_automation_test","last_synced_at":"2025-05-14T07:08:22.549Z","repository":{"id":37664594,"uuid":"116943580","full_name":"githublitao/api_automation_test","owner":"githublitao","description":"接口自动化测试平台（老平台移步master_old分支）","archived":false,"fork":false,"pushed_at":"2025-04-10T05:14:05.000Z","size":45489,"stargazers_count":1605,"open_issues_count":9,"forks_count":857,"subscribers_count":86,"default_branch":"master","last_synced_at":"2025-04-11T02:51:28.508Z","etag":null,"topics":["apitest","django","python3","requests","vue"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/githublitao.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,"zenodo":null}},"created_at":"2018-01-10T10:35:27.000Z","updated_at":"2025-04-10T07:51:12.000Z","dependencies_parsed_at":"2024-06-29T13:26:11.437Z","dependency_job_id":"2ab81258-8ca8-4f37-9789-b65250e49993","html_url":"https://github.com/githublitao/api_automation_test","commit_stats":{"total_commits":815,"total_committers":5,"mean_commits":163.0,"dds":0.05521472392638038,"last_synced_commit":"78f8c163cba0c552be2250697e88f4094e159401"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githublitao%2Fapi_automation_test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githublitao%2Fapi_automation_test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githublitao%2Fapi_automation_test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githublitao%2Fapi_automation_test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/githublitao","download_url":"https://codeload.github.com/githublitao/api_automation_test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092659,"owners_count":22013290,"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":["apitest","django","python3","requests","vue"],"created_at":"2024-08-01T21:02:02.291Z","updated_at":"2025-05-14T07:08:22.531Z","avatar_url":"https://github.com/githublitao.png","language":"JavaScript","readme":"# api_automation_test\n\n# 接口测试平台从开始到放弃\n# python3.6.3 Django 2.0.2框架\n服务器已过期，不准备续费\n体验地址：http://120.79.232.23  请体验用户不要删除已有数据\u003cbr\u003e\n\n# 版本更新：\n## v2.3\u003cbr\u003e\n引入docker部署,由于采用的docker，基础镜像为centos，所以Windows下部署仍然可以使用定时任务\n```\n docker-compose up\n```\n## v2.2\u003cbr\u003e\n1.新增钉钉登录\u003cbr\u003e\n```\n1.先在钉钉开发平台上创建账号\u003cbr\u003e\n2.替换dingConfig.py里的appid和APPSECRET\u003cbr\u003e\n3.修改前段login.vue里的回调地址\u003cbr\u003e\n  ```\n## V2.1.2\u003cbr\u003e\n1.增加导出测试用例功能\u003cbr\u003e\n## V2.1.1\u003cbr\u003e\n1.新增swaggerUI界面，访问地址127.0.0.1:8000/docs/\u003cbr\u003e\n## V2.1\u003cbr\u003e\n1.优化前端代码，适配屏幕分辨率，未做浏览器兼容性，目前只在chrome上浏览正常\u003cbr\u003e\n2.新增mock功能，api管理模块可启动，关闭mock，启动后，通过访问http://127.0.0.1:8000/mock/+真实url，可返回mock信息\n## V2.0\u003cbr\u003e\n重构接口代码，引入反序列化方式，修改接口为基于类的方式，因修改大量后台接口代码，前端未更新，所以目前前端调用接口会出现大量问题，目前平台暂不可用，后续更新\n\n## 系统声明：\n---\n1.本系统采用Django REST framework编写接口，前端页面采用比较容易上手的vue+elementUI\u003cbr\u003e\n2.初步学习web开发，接口统一采用基于方法的方式编写，后续引入权限系统，并修改成基于类的方法\u003cbr\u003e\u003c/br\u003e\n\n## 使用方法：\n---\n### 1.安装Python3环境（未在Python2上运行后，不知道有没有问题）\u003cbr\u003e\n### 2.下载代码到本地并解压\u003cbr\u003e\n### 3.cmd到根目录下安装相关依赖包\u003cbr\u003e\n```bash\npip install -r requirements.txt\u003cbr\u003e\npip install https://github.com/darklow/django-suit/tarball/v2\n```\n### 4.安装mysql数据库，配置数据库连接，进入api_automation_test/settings.py\u003cbr\u003e\n```python\nDATABASES = {\n    'default': {\n        # 'ENGINE': 'django.db.backends.sqlite3',\n        # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),\n        'ENGINE':'django.db.backends.mysql',     # 数据库类型，mysql\n        'NAME':'api_test',            #  database名\n        'USER':'root',               # 登录用户\n        'PASSWORD':'123456',        #  登录用户名\n        'HOST':'127.0.0.1',        # 数据库地址\n        'PORT':'3306'              # 数据库端口\n    }\n}\n```\n### 5.cmd到根目录下，让 Django 知道我们在我们的模型有一些变更\u003cbr\u003e\n```bash\npython manage.py makemigrations\n```\n### 6.创造或修改表结构\u003cbr\u003e\n```bash\npython manage.py migrate \n```\n### 7.创建超级用户，用于登录后台管理\u003cbr\u003e\n```bash\npython manage.py createsuperuser\n```\n### 8.安装VUE环境，下载node.js并配置环境，下载npm包管理器\u003cbr\u003e\n### 9.cmd进入frontend目录下，运行npm install安装相关依赖包\u003cbr\u003e\n### 10.打包\u003cbr\u003e\n```bash\nnpm run build\n```\n### 11.运行启动django服务\u003cbr\u003e\n```bash\npython manage.py runserver 0.0.0.0:8000\n```\n### 12.现在就可以访问 http://127.0.0.1:8000/login 进行登录， http://127.0.0.1:8000/admin 为后台管理平台\u003cbr\u003e\n## 微信打赏：\u003cbr\u003e\n![微信打赏](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E6%94%B6%E6%AC%BE%E7%A0%81.png)\u003cbr\u003e\n\u003cbr\u003e\n## 系统图解：\u003cbr\u003e\n![系统图](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E7%B3%BB%E7%BB%9F%E5%9B%BE%E8%A7%A3.png)\u003cbr\u003e\n\u003cbr\u003e\n项目讲解：\n----\n1、登录页面，只提供了登录方法，并没有注册和忘记密码功能，账号由后台管理系统直接创建分配\u003cbr\u003e\n![登录页面](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E7%99%BB%E5%BD%95%E9%A1%B5%E9%9D%A2.png)\u003cbr\u003e\n\u003cbr\u003e\n2、目前只开放了接口测试，所有只有项目列表页面，可完成项目的新增，删除，查询，修改，批量删除\u003cbr\u003e\n![首页](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E9%A6%96%E9%A1%B5.png)\u003cbr\u003e\n\u003cbr\u003e\n3、新增项目\u003cbr\u003e\n![新增项目](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E6%96%B0%E5%A2%9E%E9%A1%B9%E7%9B%AE.png)\u003cbr\u003e\n\u003cbr\u003e\n4、点击项目名称后，进入项目概况界面，总的展示一些项目的基本情况\u003cbr\u003e\n![项目概况](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E9%A1%B9%E7%9B%AE%E6%A6%82%E5%86%B5.png)\u003cbr\u003e\n\u003cbr\u003e\n5、HOST配置页面，提供了，增删改查，批量修改HOST，作为执行自动化测试时的全局变量\u003cbr\u003e\n![HOST配置](https://github.com/githublitao/api_automation_test/blob/master_old/img/HOST%E9%85%8D%E7%BD%AE.png)\u003cbr\u003e\n\u003cbr\u003e\n6、新增Host\u003cbr\u003e\n![新增Host](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E6%96%B0%E5%A2%9EHost.png)\u003cbr\u003e\n\u003cbr\u003e\n7、API页面，可执行快速测试，类似于postman，新增修改删除接口分组，新增修改删除项目接口，后续计划根据输入的接口搭建mockserver和下载接口文档\u003cbr\u003e\n![API页面](https://github.com/githublitao/api_automation_test/blob/master_old/img/API%E5%88%97%E8%A1%A8.png)\u003cbr\u003e\n\u003cbr\u003e\n8、快速测试界面，类似于postman的功能，后续怎么json格式显示的样式\u003cbr\u003e\n![快速测试界面](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E5%BF%AB%E9%80%9F%E6%B5%8B%E8%AF%95.png)\u003cbr\u003e\u003cbr\u003e\n9、新增接口分组，用于按模块对接口进行分类，更好的管理接口\u003cbr\u003e\n![新增接口分组](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E6%96%B0%E5%A2%9E%E5%88%86%E7%BB%84.png)\u003cbr\u003e\u003cbr\u003e\n10、新增API，用户可新增的API，目前只支持源数据格式和form-data格式\u003cbr\u003e\n![新增API](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E6%96%B0%E5%A2%9EAPI.png)\u003cbr\u003e\u003cbr\u003e\n11、接口详情界面，查看接口基本内容，可对接口进行测试，修改，删除，查看接口历史动态\u003cbr\u003e\n![接口详情界面](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E6%8E%A5%E5%8F%A3%E8%AF%A6%E6%83%85.png)\u003cbr\u003e\n12、下载的接口文档模板\u003cbr\u003e\u003cbr\u003e\n![接口文档](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3%E6%A8%A1%E5%9D%97.png)\u003cbr\u003e\u003cbr\u003e\n13、自动化测试页面，实现自动化用例的分组，增删改查用例，并添加自动化定时任务定时任务\u003cbr\u003e\n![自动化测试页面](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E7%94%A8%E4%BE%8B%E5%88%97%E8%A1%A8.png)\u003cbr\u003e\u003cbr\u003e\n14、新增测试用例\u003cbr\u003e\n![新增测试用例](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E6%96%B0%E5%A2%9E%E7%94%A8%E4%BE%8B.png)\u003cbr\u003e\u003cbr\u003e\n15、用例下的接口列表，可添加用例接口，选择不同的环境测试接口，以及下载测试报告和设置定时任务\u003cbr\u003e\n![用例下的接口列表](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E7%94%A8%E4%BE%8B%E5%88%97%E8%A1%A8.png)\u003cbr\u003e\u003cbr\u003e\n16、用例下添加已有的接口，可添加在api模块中，已添加的接口，默认校验方式为不校验\u003cbr\u003e\n![用例下添加已有的接口](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E6%B7%BB%E5%8A%A0%E7%94%A8%E4%BE%8B%E4%B8%8B%E5%B7%B2%E6%9C%89%E7%9A%84%E6%8E%A5%E5%8F%A3.png)\u003cbr\u003e\u003cbr\u003e\n17、项目成员，只做一个展示项目组成员页面，成员添加删除由后台管理操作，后续引入权限系统，分配权限角色\u003cbr\u003e\n![项目成员](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E6%88%90%E5%91%98%E7%AE%A1%E7%90%86.png)\u003cbr\u003e\n\u003cbr\u003e\n18、展示项目三天内的动态情况\u003cbr\u003e\n![项目动态](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E9%A1%B9%E7%9B%AE%E5%8A%A8%E6%80%81.png)\u003cbr\u003e\n\u003cbr\u003e\n18、自动化测试生成的报告，保留最近10次测试结果\u003cbr\u003e\n![自动化测试报告](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E8%87%AA%E5%8A%A8%E5%8C%96%E6%B5%8B%E8%AF%95%E6%8A%A5%E5%91%8A.png)\u003cbr\u003e\n\u003cbr\u003e\n20、退出登录，跳转至登录页面\u003cbr\u003e\n![退出登录](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E9%80%80%E5%87%BA%E7%99%BB%E5%BD%95.png)\u003cbr\u003e\n\u003cbr\u003e\n21、后台管理页面，主要用作数据管理，及项目人员添加删除\u003cbr\u003e\n![后台管理](https://github.com/githublitao/api_automation_test/blob/master_old/img/%E5%90%8E%E5%8F%B0%E7%AE%A1%E7%90%86%E9%A1%B5%E9%9D%A2.png)\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithublitao%2Fapi_automation_test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithublitao%2Fapi_automation_test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithublitao%2Fapi_automation_test/lists"}