Presentation is loading. Please wait.

Presentation is loading. Please wait.

Custom Developer Testing Frameworks – A Practical Approach Yuval Mazor, Sela

Similar presentations


Presentation on theme: "Custom Developer Testing Frameworks – A Practical Approach Yuval Mazor, Sela"— Presentation transcript:

1 Custom Developer Testing Frameworks – A Practical Approach Yuval Mazor, Sela Group @yuvmaz

2 About Me Senior ALM Architect @ Sela Writing software professionally since 1998 TFS MCP Co-/Author of Microsoft Training Kits & Courses Co-Manager, Microsoft Israel ALM User Group

3

4 Agenda Unit Tests and Parachutes Company C - A Story The Concept of Environment Tests Gallio – The Tool We Use Company C Issues & Demos Summary

5 Building Software Products is like Jumping Out of an Aircraft…

6 Unit Tests – A General Parachute

7 Unit Tests – A General Parachute? Only goes so far! Sometimes it just isn’t enough

8 The Ballad of Company C VERY successful ISV ~80 R&D Staff Code base is a mess –Duplication –Big Ball-o-Mud – Want to change, but don’t know where to start

9 Working at Company C New features take AGES to complete Builds fail often (like, REALLY often) Even when they don’t, the application often doesn’t run

10 ? ?

11 Environment Tests It might build, but it won’t run Test for proper environment conditions (before build!) If you know it won’t run, don’t try to build it (fail fast, fail often) Let’s build an environment-testing framework!

12 Enter Gallio Open-Source test-framework framework (meta-framework?) The basis for the MbUnit test framework Available at http://code.google.com/p/mb- unit/http://code.google.com/p/mb- unit/ (or via NuGet)

13 When the Build Fails, Don ’ t Go Tellin ’ Tales Problem 1

14 Explanation Developers work in their own personal universe –a.k.a: But it works on my machine!! And the inevitable result:

15 Yuval… The Build ’ s Failing Again.. FIX IT!!!

16 We Want! For every test, describe exactly what can make it fail Make this a required part of the test

17

18 Problem 1 Summary Base Class: TestTypePatternAttribute Chain: SetUpTestInstanceChain

19 The Woes of the XML You Didn ’ t Close Problem 2

20 Explanation Lots and lots and lots of XML files for customer and feature configuration Used by a variety of tools both during build and runtime Developers edit those XML files frequently –In Notepad –… and check-in invalid files

21 Why is Tool X giving me these weird errors?

22 We Demand! Check every XML file in a specific directory for validity Determine which XML file(s) are bad

23

24 Problem 2 Summary Base Class: TestDecoratorPatternAttribute Chain: InitializeTestInstanceChain

25 Put the Blame on the Name Problem 3

26 Explanation The application uses many small images Image file names need to adhere to specific patterns and rules Developers tend to forget the rules

27 I ’ m not seeing the correct image here !!

28 We Require! Check every image file in a specific directory for pattern compliance Determine which image files will not be displayed

29

30 Problem 3 Summary Base Class: ContributionMethodPatternAttribute Chain: SetUpTestInstanceChain

31 Summary Gallio is a framework for developing testing frameworks and tools We used Gallio for developing an environment-testing framework Company C personnel can now rest (a little) easier!

32 Links Gallio: http://code.google.com/p/mb-unit/http://code.google.com/p/mb-unit/ Source Code: http://bit.ly/15HhzsJhttp://bit.ly/15HhzsJ

33 Thank you! @twitter www.blog.net www.linkedin.com/profile http://blogs.microsoft.co.il/blogs/yuvmaz/ @yuvmaz


Download ppt "Custom Developer Testing Frameworks – A Practical Approach Yuval Mazor, Sela"

Similar presentations


Ads by Google