specflow for agile teams

25
SpecFlow for Agile Teams Alejandro Ramirez Senior Consultant Polaris Solutions

Upload: alejandro-ramirez

Post on 08-Feb-2017

404 views

Category:

Business


0 download

TRANSCRIPT

Page 1: SpecFlow for Agile Teams

SpecF low for Ag i le TeamsAlejandro RamirezSenior ConsultantPolaris Solutions

Page 2: SpecFlow for Agile Teams

Platinum Sponsors

Silver Sponsors

Gold Sponsors

Page 3: SpecFlow for Agile Teams

The evolved role of testing

Image credit: http://www.archeolog-home.com/pages/content/how-humans-became-masters-of-the-earth.html

Black-Box Agile

Page 4: SpecFlow for Agile Teams

Test automation pyramid

GUITests

Acceptance Tests

Unit Tests

ManualTests

Page 5: SpecFlow for Agile Teams

Test automation pyramid

GUITests

Acceptance Tests / BDD | ATDD

Unit Tests / Component Tests/ TDD

ManualTests

CodedUI Visual Studio

SpecFlow Visual Studio

xUnit Visual Studio

Manual Test CasesExploratory Tests MTM

AgileMaturity

Page 6: SpecFlow for Agile Teams

ATDD or BDD?They are the same thing!

Agile techniques

Started in 2003

Understanding software behavior through discussion

Discussing acceptance criteria with examples

Focus on why and benefits of code

Embodies the definition of done in testsImage is copyright of Nintendo

https://microsite.nintendo-europe.com/Stay_Updated/ptPT/

Page 7: SpecFlow for Agile Teams

What is SpecFlow?Not a pickle

Automated testing tool

Runs acceptance tests written in BDD style

It’s Cucumber for .NET

Page 8: SpecFlow for Agile Teams

What you need to use it• Visual Studio

• SpecFlow package

• Learn Gherkin

Page 9: SpecFlow for Agile Teams

How to use SpecFlow in 3 StepsONE: Specify behavior in Gherkin

TWO: Automate scenarios

THREE: Enjoy and repeat

Page 10: SpecFlow for Agile Teams

Example( y o u a r e g o i n g t o l o v e i t )

Page 11: SpecFlow for Agile Teams

Specifying behavior with GherkinDescribe behavior in plain English

Given, When, Then

In order to,As a,

I want toFeature

Behavior

Page 12: SpecFlow for Agile Teams

Feature: Add CustomerIn order to store new customer informationAs a User of the XYZ systemI want to be able to create and store new customers

Page 13: SpecFlow for Agile Teams

Scenario 1: Happy PathGiven a user has entered information about a customerWhen he/she completes entering more informationThen the customer information should be stored in the system

Page 14: SpecFlow for Agile Teams

Scenario 1 (more elaborate)Given a user has entered information about a customerAnd he/she has provided a first name and a last nameWhen he/she completes entering more informationThen the customer information should be stored in the system

Page 15: SpecFlow for Agile Teams

Scenario 1 (even more elaborate)Given a user has entered information about a customerAnd he/she has provided a first name and a last nameWhen he/she completes entering more informationThen the customer information should be stored in the system

Page 16: SpecFlow for Agile Teams

Scenario 1 (even more elaborate)Given a user has entered information about a customerAnd he/she has provided a first name and a last nameWhen he/she completes entering more informationThen the customer information should be stored in the system

Page 17: SpecFlow for Agile Teams

Scenario 2: Missing Required DataGiven a user has entered information about a customerAnd he/she has not provided the first name and last nameWhen he/she completes entering more informationThen the user will be notified about the missing dataAnd the customer will not be stored into the system

Page 18: SpecFlow for Agile Teams

Exerc ise

Page 19: SpecFlow for Agile Teams

In real life:

Page 20: SpecFlow for Agile Teams

Quick Demo

Page 21: SpecFlow for Agile Teams

Automating behaviorsGenerate stubs

Fill in the blanks

Run

Page 22: SpecFlow for Agile Teams

SpecFlow approaches for agile teamsService layer

Integration

GUI

Page 23: SpecFlow for Agile Teams

SpecFlow approaches for agile teamsDev + BADev + Test + BADev + Test

Page 24: SpecFlow for Agile Teams

Do you want to know more?

Contact:[email protected]

@alejandrormzwww.polarissolutions.com

Page 25: SpecFlow for Agile Teams

Q&A