Home » TDD

Tag Archives: TDD

The Right Kind of Failure

Basic question: why do we write our tests first and make sure they go red? Answer: because it’s possible that a test we write to test a feature after the fact would go green anyway, because it’s not really testing the feature properly… or there’s a chance that we write a test, it fails, and then we have a lot ...

Read More »

It Looks Right To Me

When writing a test it’s important to test both positive and negative scenarios. It’s important to test edge cases. However, when choosing test data, the test data needs to illustrate the test case well. If the test data is hard to connect back to the exact use case, then it can lead someone to misunderstand the test, its implied specification, ...

Read More »

A Java Test Class Doesn’t Test a Class

If you write tests badly, you end up with a Curdled Test Fixture, where there’s an unholy mess of unrelated tests in the same class. At Interview A great job interview question is to ask someone what test automation they’ve constructed and how they came to do it. A not-great answers is “none”. In my experience, worse than that is ...

Read More »

So I Wrote a Library

If you’ve never done it, go out and find an open-source project to contribute to. Whether it’s one of your own or something you use, go and try writing code in the wide open to see how it feels. I’ve recently been working on a library of my own. I say my own. It’s actually someone else’s code that I ...

Read More »

Chasing The Dragon

Functions should, ideally return something. It makes them easier to test. Same for services in a service architecture. Bosh! Chasing The Dragon Consider a component in your software where you make a request, and it handles that request by doing some processing and then passing the data to the next component for onward processing. This might be at code level, ...

Read More »

The Three Stages of Knowledge

In software development, knowing how to do things seems to fall into three stages. Ok… let’s pretend it does, it’s bound to be more complex than this, but this is a useful model, so bear with me. Facts – you’ve read how something works and how to get going with itLots of experience driven fixes – you’ve hit some problems, ...

Read More »

Need driven software development using Mocks

Excellent  paper on mocking framework by jmock author. This paper was written in 2004 that is 18 years ago but has many tips of building maintainable software system. In this post i will highlight key ideas from this paper but suggest you to read the paper to get big ideas behind mocking and programming practice.  Mock objects are extension of ...

Read More »

TDD Misbeliefs

While I was working with a previous article about Test-Driven Development (TDD) I read many blog posts and a few books on the subject and found out that I disagree with a few of them; even some that are pretty important. It seems that most software experts simply misunderstand how software development works. Maybe because they are not really programmers, ...

Read More »

The Essentials of Test-Driven Development

If you need software and you need it fast, test-driven development (TDD) may be the solution. With a focus on getting software from the computer to the market quickly, TDD is one of the most effective methods that top software development and software testing companies are using today. What Is Test-Driven Development? Agility and speed are the two concepts that ...

Read More »