{"id":15131086,"url":"https://github.com/alibaba/testable-mock","last_synced_at":"2025-04-14T06:03:55.218Z","repository":{"id":37302874,"uuid":"311530297","full_name":"alibaba/testable-mock","owner":"alibaba","description":"换种思路写Mock，让单元测试更简单","archived":false,"fork":false,"pushed_at":"2023-05-17T11:09:55.000Z","size":1567,"stargazers_count":1840,"open_issues_count":67,"forks_count":307,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-04-14T06:02:01.783Z","etag":null,"topics":["mock","unittest"],"latest_commit_sha":null,"homepage":"https://alibaba.github.io/testable-mock/","language":"Java","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/alibaba.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}},"created_at":"2020-11-10T03:06:47.000Z","updated_at":"2025-04-14T03:30:43.000Z","dependencies_parsed_at":"2023-10-20T16:37:38.852Z","dependency_job_id":null,"html_url":"https://github.com/alibaba/testable-mock","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Ftestable-mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Ftestable-mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Ftestable-mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2Ftestable-mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alibaba","download_url":"https://codeload.github.com/alibaba/testable-mock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248830398,"owners_count":21168272,"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":["mock","unittest"],"created_at":"2024-09-26T03:23:02.679Z","updated_at":"2025-04-14T06:03:55.180Z","avatar_url":"https://github.com/alibaba.png","language":"Java","funding_links":[],"categories":["测试"],"sub_categories":[],"readme":"# TestableMock\n\n换种思路写Mock，让单元测试更简单。\n\n无需初始化，不挑服务框架，甭管要换的是私有方法、静态方法、构造方法还是其他任何类的任何方法，也甭管要换的对象是怎么创建的。写好Mock定义，加个`@MockInvoke`注解，一切统统搞定。\n\n- 文档：https://alibaba.github.io/testable-mock/\n- 国内文档镜像：http://freyrlin.gitee.io/testable-mock/\n\n阅读[这里](https://mp.weixin.qq.com/s/KyU6Eu7mDkZU8FspfSqfMw)了解更多故事。\n\n\u003cfont size=\"5\"\u003e**0.7版本已发布**\u003c/font\u003e，从`0.6.x`升级到`0.7.x`版本请参考[版本升级指南](https://alibaba.github.io/testable-mock/#/zh-cn/doc/upgrade-guide)\n\n-----\n\n## 项目维护说明\n\n由于当前并行项目较多，此项目暂时转入维护阶段，在此期间`TestableMock`会继续提供不定期的版本更新。\n\n如果有遇到其他任何使用问题和建议，请直接在[Issues](https://github.com/alibaba/testable-mock/issues)中提出，也可通过[Pull Request](https://github.com/alibaba/testable-mock/pulls)提交您的代码，我们将尽快回复并处理。\n\n## 目录结构\n\n```bash\n|-- testable-parent       ➜ 提供各子模块的公共父pom文件\n|-- testable-all          ➜ 依赖聚合，便于一次性引用所有子模块功能\n|-- testable-processor    ➜ 编译期代码预处理模块，提供测试辅助功能\n|-- testable-agent        ➜ JavaAgent模块，提供Mock测试相关功能\n|-- testable-core         ➜ 基础功能模块，提供Mock相关注解和工具类\n|-- testable-maven-plugin ➜ Maven插件模块，用于简化JavaAgent注入\n|-- tool                  ➜ 项目开发过程中的工具脚本\n|-- demo\n|   |-- java-demo         ➜ Java语言的示例代码\n|   |-- kotlin-demo       ➜ Kotlin语言的示例代码\n|   |-- android-demo      ➜ Android项目的示例代码\n|   `-- spock-demo        ➜ Spock测试框架的示例代码\n`-- docs                  ➜ 项目使用文档\n```\n\n## 构建项目\n\n主项目使用JDK 1.6+和Maven 3+版本构建，其中`demo`子项目需要JDK 1.8+版本。\n\n```bash\nmvn clean install\n```\n\n## 本地生成文档\n\n```bash\ndocsify serve docs\n```\n\n\u003e TestableMock文档使用`docsify`工具生成，构建前请安装[nodejs](https://nodejs.org/en/download/)运行时，并使用`npm install -g docsify`命令安装文档生成工具。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibaba%2Ftestable-mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falibaba%2Ftestable-mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibaba%2Ftestable-mock/lists"}