Presentation is loading. Please wait.

Presentation is loading. Please wait.

Compile and Execute Requirements in Microsoft .NET

Similar presentations


Presentation on theme: "Compile and Execute Requirements in Microsoft .NET"— Presentation transcript:

1 Compile and Execute Requirements in Microsoft .NET
12/29/2018 9:37 AM AAP311 Compile and Execute Requirements in Microsoft .NET David Starr Chief Software Craftsman Scrum.org © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

2 David Starr david@scrum.org @elegantcoder
Chief Software Craftsman, Scrum.org Visual Studio ALM MVP ElegantCode.com founder @elegantcoder

3 What we used to do Develop Test

4 What we did for a while Develop Test Develop Test

5 What we are doing Develop Test Develop Test Develop Test

6 What they tell us to do TDEESVT

7 What some are doing Test Develop Test Test Develop Test

8 For each Acceptance Criteria Create a failing integration test
Create a Requirement Refactor Create a failing unit test Make the unit test pass TDD Define Acceptance Criteria For each Acceptance Criteria Create a failing integration test Make the integration test pass Demonstrate Working Software

9 Expressing Desirements
User Stories represent needed conversations As a <application role> I want <some feature or behavior> So that <I get some benefit> Scenarios document the conversation took place Given <some initial context> When <this happens> Then <this should be the result> Desirements Things we wish software did. But it doesn’t. Yet.

10 1, 2, 3 [TestMethod] public void
Total_Should_Be_1_When_1_Product_Added() { var cart = new ShoppingCart("TEST"); cart.AddItem(new Product("SKU")); Assert.AreEqual(1, cart.TotalItems); } Given When Then

11 Early attempts at cleaner test code.
Code Now Basic AAA and GWT Early attempts at cleaner test code.

12 Gherkin Domain Specific Language Business Readable
Interpreted by machines A model for software requirements 2 Purposes Feature documentation Automated test harness pic by me

13 Steps Feature: Some terse yet descriptive text
In order to realize a named business value As an explicit system actor I want to gain some beneficial outcome Scenario: Some business situation Given some precondition And some other precondition When some action by the actor And some other action Then some testable outcome is achieved And something else we can check # language: no Egenskap: Summering For å unngå at firmaet går konkurs Må regnskapsførerere bruke en regnemaskin for å legge sammen tall Scenario: to tall Gitt at jeg har tastet inn 5 Og at jeg har tastet inn 7 Når jeg summerer Så skal resultatet være 12 Steps

14 ATDD from the outside in
Code Now ATDD from the outside in The new look of software testing

15 How these tests look in a Sprint
Other validation techniques start about here Pass

16 Some gross generalizations
mostly unnecessary UI brittle, but possible View Model requirement specs here Controller / Presenter mostly unit Domain Entities and some here, too Commands Value Objects Repositories Services Data Access (EF) hopefully minimal mythical

17 Developer Tests focusing on behavior
Code Now 1, 2, 3 a little lower down Developer Tests focusing on behavior

18 Another pyramid GUI Behavioral Acceptance Tests Unit Tests
As little as possible As much as necessary At least one per requirement At least one per class or module

19 Change without fear My Code

20 Change without fear My Code

21 Change without fear My Code

22 Thank you! David Starr @elegantcoder

23 Related Content Breakout Sessions
AAP401 Real World Developer Testing with Visual Studio 11 DEV214 Introducing the New Visual Studio 11 Unit Testing Experience DEV411 Testing Un-testable Code with Fakes in Visual Studio 1

24 Resources Learning TechNet http://northamerica.msteched.com
Connect. Share. Discuss. Microsoft Certification & Training Resources TechNet Resources for IT Professionals Resources for Developers

25 Complete an evaluation on CommNet and enter to win!
Required Slide Complete an evaluation on CommNet and enter to win!

26 MS Tag Scan the Tag to evaluate this session now on myTechEd Mobile

27 12/29/2018 9:37 AM © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

28 12/29/2018 9:37 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Download ppt "Compile and Execute Requirements in Microsoft .NET"

Similar presentations


Ads by Google