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

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.

主站蜘蛛池模板: 青铜峡市| 资溪县| 翁源县| 洪湖市| 三河市| 山阴县| 遵义市| 开平市| 库车县| 娄底市| 左贡县| 舒城县| 上饶市| 临猗县| 长沙市| 威宁| 确山县| 奉化市| 上林县| 泰顺县| 峨眉山市| 南京市| 改则县| 巫山县| 博罗县| 武鸣县| 东城区| 威远县| 丹凤县| 杂多县| 平顺县| 收藏| 凤冈县| 定州市| 新乡县| 青铜峡市| 福鼎市| 静乐县| 天等县| 县级市| 托克逊县|