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

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.

主站蜘蛛池模板: 阜城县| 高阳县| 枣强县| 唐河县| 马关县| 牟定县| 三都| 玉林市| 资阳市| 武夷山市| 清涧县| 汉阴县| 青田县| 德安县| 乌拉特后旗| 永康市| 晋宁县| 绩溪县| 年辖:市辖区| 莱西市| 镇坪县| 祁连县| 嘉善县| 临沂市| 会同县| 子洲县| 南郑县| 桓台县| 靖江市| 辽中县| 南汇区| 容城县| 互助| 金塔县| 青田县| 镇远县| 永顺县| 江川县| 土默特左旗| 承德县| 甘南县|