官术网_书友最值得收藏!

Behavior-driven development

Behavior-driven development (BDD) is an agile process designed to keep the focus on stakeholder value throughout the whole project. The premise of BDD is that the requirement has to be written in a way that everyone, be it the business representative, analyst, developer, tester, manager, and so on, understands it. The key is to have a unique set of artifacts that are understood and used by everyone—a collection of user stories. Stories are written by the whole team and used as both requirements and executable test cases. It is a way to perform TDD with a clarity that cannot be accomplished with unit testing. It is a way to describe and test functionality in (almost) natural language and make it runnable and repeatable.

A story is composed of scenarios. Each scenario represents a concise behavioral use case and is written in natural language using steps. Steps are a sequence of the preconditions, events, and outcomes of a scenario. Each step must start with the words Given, When, or Then. Given is for preconditions, When is for actions, and Then is for performing validations.

This was only a brief introduction. There is a whole chapter, Chapter 8, BDD – Working Together with the Whole Team, dedicated to this topic. Now it is time to introduce JBehave and Cucumber as two of the many available frameworks for writing and executing stories.

主站蜘蛛池模板: 漠河县| 渭南市| 彰化市| 镇宁| 六枝特区| 南江县| 株洲市| 锦州市| 司法| 南宁市| 博野县| 瓮安县| 绥芬河市| 峨山| 东至县| 包头市| 灵台县| 通榆县| 江西省| 来宾市| 监利县| 拉孜县| 车险| 土默特右旗| 云南省| 越西县| 定远县| 云和县| 徐州市| 新巴尔虎左旗| 芒康县| 岗巴县| 昭平县| 友谊县| 九江市| 湘乡市| 梨树县| 香河县| 丰都县| 连江县| 讷河市|