testingisdocumenting/webtau

GitHub: testingisdocumenting/webtau

WebTau 是一个 Web 测试自动化框架,解决了跨多种技术层编写一致测试的难题。

Stars: 382 | Forks: 42

# he verb is translated, but the noun is kept. Here, the headings are just nouns, so I might need to translate them as is or provide a Chinese equivalent. Web 测试自动化 [用户指南](https://testingisdocumenting.org/webtau/) ![logo](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/7cc381f78d091044.png) WebTau (**Web** **T**est **au**tomation) - 编写端到端和单元测试的简洁而富有表现力的方式。 跨多层测试您的应用程序,并使用独特的功能: * [具有数据覆盖的 REST API](https://testingisdocumenting.org/webtau/getting-started/what-is-this/#rest-api) * [Web Socket](https://testingisdocumenting.org/webtau/getting-started/what-is-this/#websocket) * [GraphQL API](https://testingisdocumenting.org/webtau/getting-started/what-is-this/#graphql-api) * [授权角色](https://testingisdocumenting.org/webtau/getting-started/what-is-this/#persona) * [浏览器](https://testingisdocumenting.org/webtau/getting-started/what-is-this/#browser) * [伪造、静态及代理服务器](https://testingisdocumenting.org/webtau/getting-started/what-is-this/#fake-static-and-proxy-servers) * [数据库](https://testingisdocumenting.org/webtau/getting-started/what-is-this/#database) * [CLI](https://testingisdocumenting.org/webtau/getting-started/what-is-this/#cli) * [业务逻辑(仅限 JVM)](https://testingisdocumenting.org/webtau/getting-started/what-is-this/#business-logic-jvm) * [REPL](https://testingisdocumenting.org/webtau/getting-started/what-is-this/#repl) * [报告](https://testingisdocumenting.org/webtau/getting-started/what-is-this/#reporting) * [文档辅助](https://testingisdocumenting.org/webtau/getting-started/what-is-this/#documentation-assistance) 模块众多,但您可以独立使用任何所需的模块,或者通过便捷的单一导入同时使用所有模块。 # 独特的控制台输出 WebTau 控制台输出让您随时掌握进展: ![http 资源代码及其输出的图片](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/a00b9811d8091050.png) [数据覆盖](https://testingisdocumenting.org/webtau/HTTP/data-coverage)输出示例: ![http 数据覆盖的图片](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/8ebd94e642091056.png) # 强大的单元测试能力 ![映射比较的图片](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/c782755274091102.png) # 测试命令行工具 测试命令行工具从未如此简单: ``` def helloWorld = cli.runInBackground("scripts/hello-world") helloWorld.output.waitTo contain("enter your name") helloWorld.send("webtau\n") helloWorld.output.waitTo contain("hello webtau") helloWorld.stop() ``` [了解更多](https://testingisdocumenting.org/webtau/cli/foreground-command) # Perhaps for "WebTau", since it's a name, I can keep it as "WebTau" in Chinese context. Similarly for "WebSockets". 等待和验证 WebSocket 消息的不可思议的简便方法: ![websocket 测试代码的图片](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/82114b192b091108.png) [了解更多](https://testingisdocumenting.org/webtau/web-socket/received-messages) # 角色 [角色概念](https://testingisdocumenting.org/webtau/persona/introduction)让您能够简化授权测试场景: ![http persona groovy 的图片](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/ee77dbeb7a091114.png) ![http persona java 的图片](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/f2ed9f0c59091120.png) # Java, Kotlin, Groovy 脚本 测试可以编写为[脚本并执行](https://testingisdocumenting.org/webtau/groovy-standalone-runner/introduction),通过命令行或使用 [JUnit 集成](https://testingisdocumenting.org/webtau/junit5/getting-started)及构建系统。 *使用脚本的浏览器测试示例* ``` scenario("search by specific query") { search.submit("search this") search.numberOfResults.waitToBe > 1 } $ webtau testscript.groovy ``` *使用 JUnit 的浏览器测试示例* ``` public class WebSearchJavaTest { @Test public void searchByQuery() { search.submit("search this"); search.numberOfResults.waitToBe(greaterThan(1)); } } ``` # 丰富的报告 利用开箱即用的丰富报告来加速调查并持久化测试证据: ![报告示例](https://testingisdocumenting.org/webtau/doc-artifacts/reports/report-crud-separated-http-calls.png)
标签:API测试, CLI测试, GraphQL测试, JS文件枚举, pocsuite3, REPL模式, REST API测试, WebSocket测试, WebTau, Web测试, 一致性测试, 业务逻辑测试, 单元测试, 域名枚举, 数据库测试, 数据覆盖, 测试匹配器, 测试开发, 测试报告, 测试框架, 测试自动化框架, 浏览器自动化, 端到端测试, 质量保证, 软件开发, 软件测试, 集成测试