Getting Started with SpecFlow - SDD...

19
Getting Started with SpecFlow (with some BDD and ATDD thrown in) James Bender [email protected] github.com/JamesBender

Transcript of Getting Started with SpecFlow - SDD...

Page 1: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development

Getting Started with SpecFlow(with some BDD and ATDD thrown in)

James [email protected]

github.com/JamesBender

Page 2: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development

Another unit testing framework?!

Really?

REALLLLYYYYY?

I already do TDD, so…….

Page 3: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development
Page 4: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development
Page 5: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development
Page 6: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development
Page 7: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development

Test Driven Development

AND BEYOND!!

Page 8: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development

Behavior Driven Development (BDD)

Acceptance Test Driven Development (ATDD)

Page 9: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development
Page 10: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development
Page 11: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development

That’s not what I would have named it…

You shouldn’t use that tool for this…

That’s not how your work flow is supposed to be.

That is nothow you’re supposed to do this!

Page 12: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development

Demo: Tic-Tac-Toe

• Create a library to determine the winner of a Tic-Tac-Toe game

• Input is a multidimensional array of string:

– string[3, 3] { {' ', ' ', ' '},

{' ', ' ', ' '},

{' ', ' ', ' '} };

• Returns the winner token (X || O) as a string or an empty string in the rare case of a draw

Page 13: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development

Supporting Concepts

•Mocking

•Dependency Injection

Page 14: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development
Page 15: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development

Cost of fixing a defect and when

Page 16: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development

MS & IBM

Page 17: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development
Page 18: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development

Next Actions..

• Look at a the different mocking frameworks and dependency injection frameworks

• Start by writing tests for new features and defects

Page 19: Getting Started with SpecFlow - SDD Conferencesddconf.com/brands/sdd/library/BDD_In_DotNET_With_SpecFlow.pdf · Behavior Driven Development (BDD) Acceptance Test Driven Development

Want to learn more?

Thank you!

• www.JamesCBender.com

• github.com/JamesBender

[email protected]

• Twitter: @JamesBender

• hallwayconversations.com