Tag | TDD Posts

TDD is a great way to do development, and using Mock Objects is almost a requirement for doing TDD well. Unfortunately, Mock Objects often lead to unnecessary complexity and violation of several TDD principles (YAGNI and Do The Simplest Thing That Could Possibly Work). Eli Lopian has come up with a workaround for this, that enables you to continue to Do The Simplest Thing that Could Possibly work and remember YAGNI and yet use Mock Objects. Check it out ...
I have been reading several posts from folks I respect for their advancement of practices like TDD, Agile ,DDD, and so on. Their wisdom has helped give me a great toolset to build deep, maintainable code that is production-minded throughout now. This is contrasted to writing what amounted to 'demoware' as I tried to write maintainable code using RAD tools. Still, I think Agile-minded leaders need to bear in mind that the enemy is not Microsoft if their creed is in fact rooted in the pragmatism of ...
I recently started up a project on CodePlex. The project is to create a software application to help run an offline poker league. My main reason for creating this was not because I see a huge need out there for an application like this, it's more one of those projects I'm sure we all do to give us a chance to play with some new technology. In this case it's my chance to get familiar with CodePlex, and do a project from the ground up using TDD and some other agile concepts. That it can also help with ...
There's been an interesting discussion going on in the TDD mailing list, discussing the benefits (or lack of) of using mock objects and mocking frameworks. The discussion focuses on doing top-down development, where you tackle the high-level code first and during the implementation you “discover“ what lower-level supporting code is required. Instead of diving down and writing this low-level code immediately, you defer it's implementation and continue writing the high-level code having ...
Great article on the MVP pattern with clear source code and TDD all the way. Check it out at here. I'll be collecting all these resources on this pattern in one blog soon. I am in the process of digging deep into this one to escape the ASP.NET databinding kiss of death :) MIKE
I've been continuing my research and experimentation with TDD lately. For my tests that actually hit against the database (as opposed to the ones where I mock the database layer), I need to ensure that the database is in a reproducable state to ensure that the test itself is reproducable. I figured the best way to do this was to just re-create the database automatically every time my unit tests ran (well the ones that hit against the database anyways). I need to recreate not only the database schema ...
For anyone doing Test Driven Development, mocks (stubs) are commonly used. Whether you hand roll your own mocks, or use a mock framework like Rhino Mocks, stubs are used to in order to isolate the code we want to test. Before we can isolate our code, proper separations of concerns are required; such as implementing the Model View Controller or Model View Presenter pattern for UI testing. After you practice TDD for a few months, and write countless tests, you start to see a pattern of how to make ...
I just finished reading Software Engineering with Microsoft Visual Studio Team System by Sam Guckenheimer. A really excellent book. He talks about software engineering principles at a high enough level to make it interesting, and contrasts the “value-up” agile approach against the “work-down” approach typically used (ie Waterfall). But he then includes just the right amount of detail of how to realize those strategies using Team System. He goes through different scenario's ...
So I just got way too busy at Tech-Ed to blog every day. The whole thing was a great experience. It turned out that Joel was right about the sessions, I didn't really find them all that valuable, and ended up skipping most of them towards the end. I can catch them all on the DVD's in a few weeks anyways. I found sitting down and talking with the Microsoft guys, or just the other people I met there to be way more valuable to me. I had quite a few conversations with the patterns and practices guys ...
In the morning I went to “Incorporating Agile Development into Your Organization”, given by Peter Provost (http://www.peterprovost.org/) and Adam Riddlehoover (http://blogs.msdn.com/arid... This was an awesome lecture about the techniques you can use to introduce Agile concepts into your dev process, and the benefits you can expect to receive. They talked about things such as Pair Programming, Test Driven Development, Daily Standup meetings, customer involvement, etc. They ...
Very recently my current client has been pushing for Agile for MSF adoption throughout the development organization. Previously things were at or below chaos here in some areas. This of course has been no issue for me since I have studied MSF 3.0 and passed the Microsoft 70-301 exam. I also went through Rational University some years ago when I first started my career. I was lucky enough to have an employer that had enough money to send me to that training. So, easily for my first couple of years ...
I was poking through Jason Haley's blog today when I came across one of his interesting links (which are usually pretty interesting btw). It pointed to a post by Phillip Haack titled A Testing Mail Server for Unit Testing Email Functionality. I generally enjoy reading about other’s unit testing experiences as I often gain quite a bit of perspective (and get to see a lot of problems I may not otherwise get to see). Basically what he has done is taken an open source SMTP server and used it for ...
Just listenned to the latest dotnetrocks with Ted Neward as the guest. Really interesting discussion on TDD .. don't necesarily agree with alot of it but very interesting points brought up. At one point they were discussing http://www.ambysoft.com/boo... They discuss “unit testing” databases, in particular writing unit tests for the data model. I believe this is the wrong term; one should be writing integration tests for the data model. Alot of people have been ...
Looks like the TFS utility aftermarket is begining to grow. Now, if they can get TDD right…. Here is a short list of some Team System utilties that you may find useful. If you know of a Team System utility that has made your life simpler, please let me know about it and I'll add it to the list. Digerati Technologies, LLC. And thanks to Nestor for another great list: http://accentient.com/widge... ...
One of things I've always been interested in was to try a bit of TDD, but never seemed to be on a project where it was possible, but I thought with my current project I could do a bit of organised unit testing making use of VS2005 to generate the initial skeleton test classes. Had started going through the test code, completing the test cases, and some bits quite useful. Normally I would create an exe, which called into my code to test it, but this time I could just select a test and run it. Which ...
We have (the company I work for) ... as an organization decided to implement Test Driven Development (TDD). I will be posting the weekly struggles and successes we encounter as we learn what this means for the people, processes, and tools that provide solutions to our business. The initial struggle has been working through all of the concepts, patterns, and tools needed to support TDD. Implementing a methodology like TDD is consists of much more then creating some unit tests for your code. I plan ...
Rocky Lhotka was recently on DNR and made some comments about TDD that have created quite a stir. Rocky has posted a deeper explanation of his comments from the show. I first must place myself as a TDD skeptic who finds the topic worthy of more research. Personally, I have many of the same concerns that Rocky brought up. Much of what I have read on the subject focuses on building one piece of functionality at a time. I try to keep an open mind, and maybe I am missing something, but it seems that ...
In a previous post I detailed some conditions existing on development teams that would suggest some changes need to be made in order to bring about better performance and ultimately higher quality software. In this post I will identify a couple more Team Smells and discuss how these issues can be remedied and why these conditions should be addressed in the first place. Smell: Developers Spent Way Too Much In The Debugger (AKA Debugger Junkies) A good feature-rich debugger like the one that comes ...
http://codebetter.com/blogs... is one response to the show. Surprisingly enough I agree with alot of the commentary (even though I am TDD fan) and I found him to actually be supporting TDD with a very subtle change that I myself often use. I often find myself taking a slightly different TDD path than many; more similar to what Rocky describes. I often will create a stub of an object prior to writing my tests for the object, I find myself doing this even ...
I just finished listening to this week's DNR with Jean-Paul Boodhoo on TDD. Now I will say right up front that I have not actually done TDD on any of my projects. This discussion with JP really brought home the ideas in a way that was easy to understand. Carl and Richard also asked him many tough questions about pair programming, continuous integration and what happens to the rest of the team. One thing that struck close to home is with regard to what is and isn't TDD. Before I started with my current ...
Just like any project you work on, there are signs and behaviors within a development team that indicate a need for refactoring as well. Before a development team can get to the job of developing quality code, the definition of "quality code" has to be addressed, identified, and agreed upon. I believe this is the most difficult step in evolving a development team's skill set away from the 'slap it together and fix it later' mindset. Why do I think this? Because this is exactly what I'm attempting ...
I'm currently working on a smart client project at work. For the past year I've been learning about Agile software development, especially the topic and practice of Test Driven Development. This smart client project is my first real chance to put many of these newfangled ideas into action. Seek The Green On this project we are using the MVP pattern for the client-side development out of a desire to make the main application logic as testable as possible. With this in mind I started out my feature ...
Design by Contract is a methodology that was populated by Eiffel language. The DbC ideas have common aims with Test Driven Development (TDD). Both focus on software quality and tests written with code in parallel. The idea of DbC is based on contract - contract between client code and service. Each class is a service that provides set of methods (nothing new). Each method call is a client. Contract between them says that if the client satisfies some preconditions then service will ensure some postconditions. ...
Peter Gunner details an alternative approach to software development if TDD still leaves you cold. He points out that he IS a fan of TDD and often uses TDD and DbC together. From the Introduction: Design by Contract (DbC) is a software development methodology invented by Bertrand Meyer. DbC has a lot in common with the aims of Test-Driven Development (TDD): writing executable assertions in your source code to specify, before you write the implementation, the design and behaviour of your classes. ...

I've finally convinced Marcin Celej, my brother in law and fellow dev, to start blogging. He has many interesting things to say about ORMs, Workflows and developing Business Logic in general. He is also huge fan of TDD and Agile methods. So if you share these interest send him a note and please give him warm welcome here.

With the advent of unit test frameworks like JUnit, NUnit, MBUnit, ... and the new Visual Studio Team System a plethora of articles and books spread the news that unit tests are a nice thing in every programmers toolbox. We all know that solid software engineering requires a certain amount of testing. Everybody knows it and only few actually do it. This might have to do with pressing time schedules and human laziness which most programmers follow: Achieve good results with the least amount of work. ...
UPDATE: If I would have been paying more attention to the feed, I would have seen that Scott Bellware has already posted a much more indepth response to this whole fiasco [Crosspost from Managed World] If there is one thing that bothers me most about good terminology in computer programming, it is that if they are *too* good they become mere marketing buzz words. Key example: refactoring. I hear EVERYONE use this now even when it has nothing to do with what they are talking about. There are developers ...
3) Agile Project Management Model 3.1) Envision “The purpose of envisioning phase is to clearly identify what is to be done and how the work is to be accomplished.” (Highsmith 2004 p89) “During the Envision phase the vision constantly evolves based on new information. After the Envision phase it needs to be reviewed periodically to ensure that the team continues to understand the vision. (Highsmith 2004 p90) Envision stage in Agile Project Management includes activities to answers ...
Introduction Having recently attended a Test Driven Development workshop given by Scott Belware here in Montreal, I have been thinking on how I could apply the principles of TDD to the software I develop using the Nolics.NET O/R Mapper. TDD During Scott's workshop one of the main points was to use dependency injection and the strategy pattern to reduce coupling between components. The effect of doing so is to produce code that is much more testable. When developing classes using this plug-in model ...
The other TDD has nothing to do with testing. It's got everything to do with tables. Being a fan of table driven application architectures, I was glad to find this on Martin Fowler's site. I've been using these techniques to define business rules, dynamic report layouts, and user interfaces for years. They've reliably provided a way for business users to change rules, and allowed IT Pros to extend and modify applications without writing, compiling or deploying code. In some cases, the technique has ...
Number Five is alive! We chat with Scott Bellware about Test Driven Development. Scott explains the philosophy behind TDD , why it's so important to successful software development and clears the air on some popular misconceptions surrounding TDD. We also jaw about Code Coverage and Cyclometric Complexity and their importance in the well balanced developers diet... MP3: http://www.podcaststudio.ne... ...
Great article over on Mike Spille's blog which may or may not explain the nonsense below. To the tune of Duncan Ohhhhhh! I love to go codin' with Michael.Oh I love to go codin' with Mike.We code TDD with iXP,It's great cause we always think alike.We code at Sing Sing Karaoke.Where the atmosphere is great.Oh I love to go codin' with Michael'Cause Michael's my mate! DaveJust because I can... ...
Robert C. Martin's book Agile Software Development Principles, Patterns, and Practices is a must read for anyone developing software. (Unless you're writing in FORTRAN or COBOL...) I thoroughly enjoyed the book and have referred back to it as I work. Unfortunately some of the work I do is maintenance of old non-OOP code so I can't use too many of the principles on those projects. The one new project I did a couple of weeks ago got the full TDD using FoxUnit. I got to write a program to mung some ...

My friend Ben Carey delivered a webcast on Test-Driven Development with BizTalk Server 2004. Ben is one of the brightest guys I've met and has a passion for TDD.

If you're interested in TDD and are using BizTalk Server for integration scenarious, check out this webcast for Ben's ideas around how to use the two together.

 

My TechEd BOF session Pragmatic Architecture has been accepted. It's currently scheduled for Wed, June 8th at 7:45. I am really looking forward to this. Application, system and enterprise architecture are taken for granted way to often. It's not about SOA, agile, TDD etc etc etc, it's all about doing the “Right Thing”. Hope to see many of you there to take part in the discussion.
Source: http://weblogs.asp.net/rosh... This is a session from the recent Developer Testing Conference. The lecture was about Developer Testing in Google and this is only part of it: Sriram Sankar, who received his Ph.D. at Stanford. Sriram is now at Google in charge of Developer Testing. Here is the Sriram's Lecture on "Developer Testing in Google" Google is building very sophisticated products, with complex cutting edge technologies, never tried before algorithms, ...
Hey ... if you are in St. Louis, we have Jeff Julian and John Alexander tonight! September Meeting - Test-Driven Development and Unit Testing in Microsoft .NETMonday, September 26, 20045:30 - 6:30 pm Welcome6:30 - 8:30 pm ProgramJeff Julian, John Alexander One City Place DriveCreve Coeur, MO 63141[MAP] Unit Testing is a crucial piece of the development process. The problem is, most of us don't put the time in to properly construct this portion of the process. By skipping this portion, we cause issues ...
Since joining Vision Data, I have been exposed to a truly TDD (Test-Driven Development) environment, along with other agile methodologies. I must say that my productivity has risen substantially and the about of issue-less code written has went through the roof. Because of this, John Alexander and I will be presenting at the end of the month in St. Louis of TDD. If you are in the area on Sept. 27th, I hope you can make it. It has been almost a year since I have been to St. Louis and I am getting ...
Steven Cohn has a post Risk Based Unit Testing in which he describes the difference between tactical vs strategic unit testing. Tactical would be along the lines of TDD in which almost every individual method and property has a test written for it. Strategic would be testing the logical business case. This level of testing would actually test several method and property calls. The point being the test isn't as concerned with each individual method call, but the end result of making several method ...
Well I finished the book Test-Driven Development in Microsoft .NET and I still feel less then satisfied. My problem with TDD stems from the test first then code idea. I like the idea of being able to test the public interface to a class, assembly etc. This can really be useful in a team development environment. An example of this happend to a co-worker today. Someone changed what was returned by a property. Not sure if anyone figured out why, but a simple NUnit test would have discovered this, and ...
I have been reading Test-Driven Development in Microsoft .NET and I'm a bit disappointed. I am really trying to see the benefit of TDD, but I have to admit that it is escaping me. I see the benefit of using a tool such as NUnit or CSUnit, and plan on implementing the tool in our process. The part I'm having a hard time with is writing the test first then the code. It seems to me that by doing that you design your app to meet the tests and not to solve the business need. I know the idea is to write ...