56
Acceptance criteria with SpecFlow project case study June 2010

Acceptance Criteria with SpecFlow

Embed Size (px)

DESCRIPTION

Automating Acceptance Criteria with SpecFlow

Citation preview

Acceptance criteria with SpecFlow

project case study June 2010

#1 CONTEXT

Using Scrum

core team of 5

started in June 2009

Using XP techniques

pair programming

TDD

Project GQ OSCA

.NET 3.5

C#

SQL 2005

TFS 2008 with STS

Visual Studio 2008 with Resharper

NHibernate Hitachi Framework

ASP.NET MVC

#2 EVOLUTION

#3 ACCEPTANCE TESTING

As a GQ OSCA Administrator I want to Create a new EME window for an academic year so that I can configure the assessment material for a paper

Acceptance Criteria

• User select 'Add New Window' creates new row for date

• User can use Calendar Select to select Start Date, End Date, and Publish Date

• For Start Date: Must be within Academic year, and not within another existing window

• For End Date: Must be after Start Date, and not within another existing window

• For Commentary Publish Date: Must be after End Date, and not within another existing window

Scenario #1

• EME Start Date is outside Academic Year – GIVEN

• the EME Start Date is outside of the current Academic Year

– WHEN • the GQ OSCA Administrator tries to save the

EME Window details

– THEN • the form should display an error message stating

that the start date must be within the Academic Year

Scenario #2

• EME Start Date is before EME End Date

– GIVEN

• the EME Start Date is after the EME End Date

– WHEN

• the GQ OSCA Administrator tries to save the EME Window details

– THEN

• the form should display an error message stating that the Start Date must be before the End Date

Scenario #3

• Existing EME Window and new EME Window Start Date is in existing EME Window – GIVEN

• An EME Window already exists • the new EME Start Date is within the existing EME

Window

– WHEN • the GQ OSCA Administrator saves the EME Window

details

– THEN • the form should display an error message stating that

the Start Date must not be within another EME Window

Workflow

#4 SPECFLOW

Gherkin

prepare context set state

execute actions

make assertions

#5 MORE EXAMPLES

Challenges

• Users writing the acceptance tests

• Meaningful tests

• Correct granularity of acceptance tests

• Coverage

Reference

• Gherking

http://wiki.github.com/aslakhellesoy/cucumber/gherkin

• Cucumber

http://cukes.info/

• SpecFlow

http://www.specflow.org/