Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!

TDD

  • submit to reddit

Unit testing when Value Objects get in the way

Tests developed during TDD can be classified into several levels, depending on the size of the object graph they need to work with. End-to-end tests span the whole application graph, while unit tests usually target a single public class at a time.

0 replies - 3610 views - 01/26/12 by Giorgio Sironi in Articles

TDD for multithreaded applications

This article describes some practices for test-driving multithreaded and distributed applications written in Java. The example I worked on and we will use is a peer-to-peer application composed of many Nodes (clients) and of a few Supernodes (servers).The...

4 replies - 4244 views - 01/03/12 by Giorgio Sironi in Articles

TDD vs. BDD: or why can’t we all just get along?

I was listening to another good Hanselminuets podcast - Understanding BDD and NSpec with Matt Florence and Amir Rajan. As always it was a good and informative show. Towards the end of the show one of the interviewees (I think it was Amir) explained why BDD...

0 replies - 4675 views - 12/12/11 by Dror Helper in Articles

What I learned in the Global Day of Code Retreat

This Saturday, 2200 software developers gathered in more than 90 cities around the world to improve their skills. This Global Day of Code Retreat was the biggest edition of such an event.

2 replies - 3566 views - 12/05/11 by Giorgio Sironi in Articles

Basic Mistakes in Database Testing

There is a huge number of books about TDD. Those books usually concentrate on using test for units of work. Units of work are understood in many different ways, usually it means a class. So the books say: write a lot of tests, make code in such a way the...

8 replies - 7679 views - 11/28/11 by Mitchell Pronsc... in Articles

Martin Fowler: Specification By Example

I was attending a workshop at XP/Agile Universe in 2002 when the phrase 'Specification By Example' struck me as a way to describe one of roles of testing in XP. This is a 2011 Retread of post orginally made on 18 Mar 2004 

0 replies - 4656 views - 11/18/11 by Martin Fowler in Articles

Tell, Don't Ask in the case of a web service

This is a language agnostic post: it is valid for each object-oriented imperative language like Java, C#, PHP. Let's start from the beginning: a web service adapterI had a requirement: downloading posts from a particular group on LinkedIn for analysis of...

8 replies - 4384 views - 10/20/11 by Giorgio Sironi in Articles

Your Code is NOT Somebody Else’s Problem

Imagine an ant working at the top of a mountain. Next to it, there’s a sluice of melt water running and, at that moment, the ant removes a tiny particle from the rock face. A few hundred molecules of water quickly seize upon the shortcut, and gravity...

3 replies - 5739 views - 09/01/11 by Daniel Ackerson in News

How to return default(Type) in runtime – a TDD example in four unit tests

I’ve found this question while going over my old StackOverflow answers:I'm using reflection to loop through a Type's properties and set certain types to their default. Now, I could do a switch on the type and set the default(Type) explicitly, but I'd...

1 replies - 4548 views - 07/18/11 by Dror Helper in News

TDD adapted for mere mortals

I’ve been teaching and practicing agile for several years and there is definitely a problem with TDD: People find it very difficult to use. I believe there are certain points, either in the TDD itself or in people’s interpretation of it, that should...

16 replies - 5308 views - 06/24/11 by kent tong in News

Achieving Test Driven Nirvana

Well perhaps not Nirvana then, but at least having a suitable level of test coverage. 

1 replies - 4185 views - 06/15/11 by Martin Harris in News

The 4 rules of simple design

A colleague of mine told me a bit ago that Red-green instead of Red-green-refactor was becoming an issue: many commits where made just when the green bar was reached. A reason for this behavior was the fear of overdesigning the system and code for tomorrow...

0 replies - 7410 views - 05/17/11 by Giorgio Sironi in Articles

Don’t fix invisible bugs

Last week I conducted yet another code review. While looking at the code I’ve noticed a lot of lines similar to If(x != null) and if(y < 0) all over the code. These lines were not “business related” but were put in the code to make sure that proper...

19 replies - 7327 views - 05/15/11 by Dror Helper in News

Basic Eclipse Setup for TDD

Today I like to share my basic setup for TDD with Eclipse.

8 replies - 7740 views - 04/08/11 by Christoph Pater in Tips and Tricks

Making Test Driven Development Work: Test Readability

To achieve an impeccable system design, write a failing test first, a simple implementation to pass the test, refactor and repeat. Sounds easy, right? Then why is it not so easy to get developers to adopt this technique on a regular, or better yet,...

3 replies - 5191 views - 02/23/11 by Jonathan Fullam in Articles