{"id":16408875,"url":"https://github.com/cweijan/http-test","last_synced_at":"2025-03-23T06:30:57.036Z","repository":{"id":57732864,"uuid":"266972034","full_name":"cweijan/http-test","owner":"cweijan","description":"Java测试框架, 用于对SpringMvc接口进行快速测试.","archived":false,"fork":false,"pushed_at":"2022-08-23T07:44:37.000Z","size":1354,"stargazers_count":14,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T18:15:26.123Z","etag":null,"topics":["java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cweijan.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-26T07:18:26.000Z","updated_at":"2025-03-18T10:07:22.000Z","dependencies_parsed_at":"2022-09-26T22:11:08.713Z","dependency_job_id":null,"html_url":"https://github.com/cweijan/http-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cweijan%2Fhttp-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cweijan%2Fhttp-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cweijan%2Fhttp-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cweijan%2Fhttp-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cweijan","download_url":"https://codeload.github.com/cweijan/http-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245066496,"owners_count":20555402,"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":["java"],"created_at":"2024-10-11T06:18:09.334Z","updated_at":"2025-03-23T06:30:55.916Z","avatar_url":"https://github.com/cweijan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTTP-Test\n\n该项目用于帮助Java开发人员快速测试SpringMvc接口\n\n注: 该插件使用的API已过时, 无法在新版本IDEA使用, 目前我没时间维护, 建议卸载.\n\n# 快速开始\n\n1. 安装IDEA插件\n- 从插件仓库[http-test](https://plugins.jetbrains.com/plugin/15375-http-test-support)\n- 直接下载[jar包](https://github.com/cweijan/http-test-idea/releases/download/1.2.1/Http-Test-IDEA.jar)安装\n\n2. 增加maven依赖\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.cweijan\u003c/groupId\u003e\n    \u003cartifactId\u003ehttp-test\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.1\u003c/version\u003e\n    \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n3. 在SpringMvc的Controller类上面按下alt+enter, 在弹窗的菜单中点击**创建Http测试用例**\n\n演示: \n\n![example](example.gif)\n\n# 增加请求头\n\n1. 在生成测试用例的弹窗中勾选beforeRequest\n![header](header.png)\n2. 之后便可在以下代码中自行添加请求头.\n![beforeRequest](beforeRequest.png)\n\n\n# 常用API\n- Generator: 用于生成mock数据\n- Asserter: 用于对数据进行断言验证\n- Mocker: 可修改默认设置\n\n# 实现原理\n1. 扫描controller并使用ByteBuddy动态创建feign接口\n2. 根据接口创建feign\n3. 构建controller代理, 执行方法时实际调用feign\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcweijan%2Fhttp-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcweijan%2Fhttp-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcweijan%2Fhttp-test/lists"}