CSC/ECE 517 Fall 2014/ch1a 25 rs

From Expertiza_Wiki
Revision as of 23:38, 7 October 2014 by Rgschaef (talk | contribs) (Created page with "=JBehave= ==Behavior Driven Development== ===Overview=== Behavior driven design (BDD) exists as an extension to Test Driven Development(TDD). Overall, BDD can be thought of as ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

JBehave

Behavior Driven Development

Overview

Behavior driven design (BDD) exists as an extension to Test Driven Development(TDD). Overall, BDD can be thought of as a specialized form of TDD that utilizes specialized tools (such as JBehave) to accomplish similar tasks with more emphasis on the accessibility of the program tests as opposed to the rigid, structured format of conventional acceptance tests.

Comparison to Test Driven Development

The language used for test cases immediately distinguishes BDD from TDD. Also, in BDD, the test cases emcompass both the specification for the program as well as the actual test case.

Background

JBehave is a Java-based framework that aims to function as a fully fledged development paradigm, utilizing communication and automation while using behavior based language in its descriptors.

Concepts

Stories

A story is fundamentally defined as an "automatically executable increment of business functionality." We can think of this as a single component of functionality. Stories are further comprised of scenarios, which are defined as concrete examples of the behavior of the system. In other words, a specific instance of an implementation of a story. Scenarios are further broken down into steps, which are single statements that detail (step by step, if you will) exactly how a scenario will play out.

Narrative:
In order to communicate effectively to the business some functionality
As a development team
I want to use Behaviour-Driven Development
     
Scenario:  A scenario is a collection of executable steps of different type
 
Given step represents a precondition to an event
When step represents the occurrence of the event
Then step represents the outcome of the event
 
Scenario:  Another scenario exploring different combination of events
 
Given a precondition
When a negative event occurs
Then a the outcome should be captured  

Keywords

Five Step Overview

Integrating with Eclipse

Examples

References

1. http://jbehave.org/
1. http://en.wikipedia.org/wiki/Behavior-driven_development
1. http://www.ryangreenhall.com/articles/bdd-by-example.html