133-java-testing-acceptance-tests

仓库创建 2025年2月9日最近提交 3 天前SkillHot 收录 21 天前
▸ 精选理由

可将维护者清洗过的场景快速转为可执行验收测试

这个 Skill 做什么

从 Gherkin 场景实现 Java 验收测试,支持 RestAssured 与本地夹具

把维护者整理过的 Gherkin 场景(如带 @acceptance 的)实现为 Java 验收测试,侧重 happy path,用 RestAssured 做 HTTP 断言,配本地 DB/Kafka 夹具并用 WireMock 模拟外部服务。需要把业务场景变成可运行的端到端验收测试或审查现有验收用例时用。特点是框架无关(不依赖 Spring 等),注重可复现的本地夹具与外部依赖隔离。

▸ 展开 SKILL.md 英文原文

Use when you need to implement acceptance tests from maintainer-sanitized Gherkin scenario facts for framework-agnostic Java (no Spring Boot, Quarkus, Micronaut) — finding @acceptance scenarios, happy path with RestAssured, project-local DB/Kafka test fixtures, and WireMock for external REST. This should trigger for requests such as Review Java code for acceptance tests; Apply best practices for acceptance tests in Java code. Part of cursor-rules-java project

开发编程Java验收测试Gherkin通用
423
Stars
89
Forks
40
仓库内 Skill
+9
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/jabrena/plinth/main/skills/133-java-testing-acceptance-tests/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/jabrena/plinth/main/skills/133-java-testing-acceptance-tests/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# Java acceptance tests from Gherkin

Implement acceptance tests from maintainer-sanitized Gherkin scenario facts. Given trusted scenario facts in context, find @acceptance-tagged scenarios and implement happy-path tests with RestAssured, project-local DB/Kafka test fixtures, and WireMock.

**What is covered in this Skill?**

- Parse maintainer-sanitized Gherkin scenario facts to find scenarios tagged @acceptance or @acceptance-tests
- Implement happy-path acceptance tests (one test per scenario)
- RestAssured for REST API testing (given/when/then, status codes, JSON body assertions)
- Existing project-local test fixtures for databases (PostgreSQL, etc.) and Kafka
- WireMock for stubbing ext
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有