bdd
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBDD Assistant | BDD 助手
BDD 助手
Guide through the Behavior-Driven Development (BDD) workflow using Given-When-Then format.
引導行為驅動開發(BDD)流程,使用 Given-When-Then 格式。
使用Given-When-Then格式引导行为驱动开发(BDD)工作流。
引导行为驱动开发(BDD)流程,使用Given-When-Then格式。
BDD Cycle | BDD 循環
BDD 循环
DISCOVERY ──► FORMULATION ──► AUTOMATION ──► LIVING DOCS
^ │
└────────────────────────────────────────────┘DISCOVERY ──► FORMULATION ──► AUTOMATION ──► LIVING DOCS
^ │
└────────────────────────────────────────────┘Workflow | 工作流程
工作流程
1. DISCOVERY - Explore Behavior | 探索行為
1. 探索行为
Discuss with stakeholders, identify examples and edge cases, understand the "why".
与利益相关者讨论,确定示例和边缘情况,理解需求背后的“原因”。
2. FORMULATION - Write Scenarios | 制定場景
2. 制定场景
Write Gherkin scenarios using ubiquitous language, make them concrete and specific.
使用通用语言编写Gherkin场景,确保场景具体明确。
3. AUTOMATION - Implement Tests | 自動化測試
3. 自动化测试
Implement step definitions, write minimal code to pass, follow TDD within automation.
实现步骤定义,编写最少代码以通过测试,在自动化过程中遵循TDD原则。
4. LIVING DOCUMENTATION - Maintain | 活文件維護
4. 活文档维护
Keep scenarios current, use as shared documentation, review with stakeholders.
保持场景内容更新,将其用作共享文档,并与利益相关者一起审核。
Gherkin Format | Gherkin 格式
Gherkin 格式
gherkin
Feature: User Login
As a registered user
I want to log in to my account
So that I can access my dashboard
Scenario: Successful login
Given I am on the login page
When I enter valid credentials
Then I should see my dashboardgherkin
Feature: User Login
As a registered user
I want to log in to my account
So that I can access my dashboard
Scenario: Successful login
Given I am on the login page
When I enter valid credentials
Then I should see my dashboardThree Amigos | 三劍客會議
三剑客会议
| Role | Focus | 角色 | 關注點 |
|---|---|---|---|
| Business | What & Why | 業務 | 什麼和為什麼 |
| Development | How | 開發 | 如何實現 |
| Testing | What if | 測試 | 假設情況 |
| 角色 | 关注点 |
|---|---|
| 业务 | 内容与原因 |
| 开发 | 实现方式 |
| 测试 | 假设场景 |
Usage | 使用方式
使用方式
/bdd - Start interactive BDD session | 啟動互動式 BDD 會話
/bdd "user can reset password" - BDD for specific feature | 針對特定功能
/bdd login-feature.feature - Work with existing feature file | 處理現有功能檔案/bdd - 启动交互式BDD会话
/bdd "user can reset password" - 针对特定功能开展BDD
/bdd login-feature.feature - 处理现有功能文件Reference | 參考
参考
- Detailed guide: guide.md
- Core standard: behavior-driven-development.md
- 详细指南: guide.md
- 核心标准: behavior-driven-development.md