I m new to BDD, but I found it is very interest and wish to develop my next project using BDD. 在 go和观看屏幕后,我仍然有许多关于实际生活中的捍卫布隆迪人权的问题。
1. Declarative or Imperative Options?
大部分特定时段假设情况 我看到,我是根据“倡议”(简化)撰写的。
Scenario: Login
Given I am on the Login-page
When I enter AUser in the textbox UserName
And I enter APassword in the textbox Password
And I click the Login button
Then I should see the following text You are logged in
我发现这些测试极易碎,没有说明点击纽州的商业价值。 我认为,它的梦.可以维持。 为什么大多数实例都使用必要的假设情景?
Scenario: Login (declarative)
Given I am not logged in
When I log in using valid credentials
Then I should be logged in
如果你更喜欢申报风格,那么你如何描述诸如家庭页或产品页之类的 st?
2。
Most of steps implementations I saw used WatiN, White or something like that to implement scenarios from user point of view. Starting browser, clicking buttons. I think its extremely slow and brittle. Well, I can use something like Page object to make tests less brittle. But thats another amount of work. Especially for desktop applications with complex UI.
你们如何在实际生活项目中执行假想——通过测试控制员/介绍人进行。
<>strong>3. Real database or not?
在实施部分假想时,往往需要系统的某些数据(例如,某些产品申请商店)。 你们如何执行这一部分——将数据添加到真正的数据库(全端到终端测试),或向控制人员提供存放处的麻烦?
Waiting for experienced answers!
UPDATE: 在问题上添加有用的链接。