094-Behavior-Driven-Development BDD行为导向开发 Writing Scenarios 编写场景

 

 

BDD简介

What is BDD

BDD is about understanding, documenting and verifying

business requirements

through illustrative examples

 

 

 

BDD activities

094-Behavior-Driven-Development 行为导向开发 Writing Scenarios 编写场景

 

 

 

Basic Example

如果我们要写一个关于scoring system的Scenario场景

Scenario: Correct easy answer scores 10

Given I register a team

When I submit a correct easy answer

Then my score should be 10

 

 

这些场景是

1.illustration for the requirements

2.documentation of the behaviors

3.automated tests

 

 

 

 

Good BDD Scenarios

 

 

 

Fixing mechanics-focused scenarios

Example举例:

Scenario: Question Test

When I check the home page

Then the title should be 'Home'

Given I have logged in

When I ask a new question ...

 

 

Small and focused scenarios are much better!

 

 

 

 

 

 

 

 

 

 

相关文章:

  • 2022-01-07
  • 2022-02-16
  • 2021-11-03
  • 2021-08-24
  • 2021-05-17
  • 2022-12-23
  • 2021-11-09
猜你喜欢
  • 2021-12-31
  • 2021-08-16
  • 2021-08-11
  • 2021-12-02
  • 2021-06-11
  • 2022-12-23
  • 2021-05-27
相关资源
相似解决方案