Test-Driven Development and MVP

2539 days ago, 917 views
PowerPoint PPT Presentation
Test-Driven Advancement and MVP. Cory Foy and Michael Russo. What's Coming down the road. Process Flavors Strategies Demo Presenting TDD Challenges Questions?. Process. Test versus Outline Red, Green, Refactor No Generation Code without a Fizzling Test State Based versus Collaboration Based Tests.

Presentation Transcript

Slide 1

Test-Driven Development and MVP Cory Foy and Michael Russo

Slide 2

What's Ahead Process Flavors Techniques Demo Introducing TDD Challenges Questions?

Slide 3

Process Test versus Design Red, Green, Refactor No Production Code without a Failing Test State Based versus Interaction Based Tests

Slide 4

Flavors Behavior-Driven Development Domain-Driven Design Acceptance-Test Driven Development Feature-Driven Development Example-Driven Development Hope-Driven Development

Slide 5

Techniques - Tools xUnit Tools .NET – NUnit, MbUnit, xUnit.NET, Visual Studio Test Tools, TD.NET, Resharper Java – JUnit, JBehave Ruby – test_unit, rSpec, Cucumber Other Tools FitNesse/FIT AgileDocs/TestDocs

Slide 6

Techniques – Rules Two primary wellsprings of "standards" Feather's Rules – from Michael Feathers' Working Effectively with Legacy Code North's Rules – from Dan North's BDD sessions

Slide 7

Techniques – Feathers' Rules Not a unit test on the off chance that it Talks to the database Communicates Across the Network Touches the File System Can't keep running in the meantime as your other unit tests Have to do exceptional things in your condition to run it (config document changes, code changes, and so forth)

Slide 8

Techniques – North's Rules Come from Behavior-Driven Development Test Method Names ought to be sentences Keep Test Methods Focused It ought to be demonstrate from the innocence what the test is doing "Conduct" is more valuable than "test" Acceptance Criteria ought to be executable BDD is an umbiqutious dialect for investigation

Slide 9

Techniques - Spikes When it totally, decidedly must be there without tests Useful for figuring out whether something is notwithstanding going to work Timebox the Spike Throw away the code toward the end and re-try it test-first

Slide 10

Techniques – Helpful Patterns Dependency Injection Separation of Concerns MVP/MVC Model View Presenter Model View Controller

Slide 11

Demo TDD/MVC Demo Starring Michael Russo as "Beginner" Cory Foy as "Cory" The group of onlookers as "The Hecklers"

Slide 12

Introducing TDD Legacy Code Pick up a duplicate of Working Effectively With Legacy Code Write unit tests for bugs Write Characterization tests for elements Greenfield Project No creation code without a coming up short test Executable Specifications Automated Acceptance Test Criteria

Slide 13

Challenges Language Support Slow Tests Keeping up with the tests Developer Mindsets Management Mindsets Legacy Code

Slide 14

Questions? Ask now Or, you know, ask later, a short time later, or by means of email, or twitter, or we'll give you our telephone numbers. Come over for supper. We'll talk all the more then.

Slide 15

Information Agile Tampa – http://agiletampa.spaces.live.com Cory's Blog – http://www.cornetdesign.com Agile Florida – http://www.agileflorida.com NUnit – http://www.nunit.org FitNesse – http://www.fitnesse.org