Is Agile really different from TDD ? If so what are the main differences ?
http://en.wikipedia.org/wiki/Agile_software_development
http://en.wikipedia.org/wiki/Test-driven_development
In short, TDD and Agile really focus on different aspects, and aren't mutually exclusive of one another.
TDD is very focused on how code gets written (and thus tends to be aimed at the work cycles of individual or small groups of developers exclusively).
Agile is really focused on the overall development process, not just how the code gets written and tested (and thus focuses a lot on project management and groups of developers, as opposed to specifically how a given developer writes code).
The differences are huge because I think there's a very simple distinction:
Agile is a philosophy whereas TDD is a specific methodology.
There are any number of ways you can work that are agile but by and large you are either doing TDD or you're not.
You can be Agile without using TDD (or a variant thereof) and you can use TDD without being agile (though I'd be somewhat surprised).
Agile is anything that is inline with the values listed here - http://agilemanifesto.org/
XP (Extreme Programming) is a methodology that qualifies as agile. There are others too (Scrum, Crystal, etc..)
TDD (Test Driven Development) is a specific engineering practice from XP - which is a way to write code + drive design in incremental chunks. You write a test first, make it pass with the simplest possible change and then refactor to improve the structure/design. You do this in a loop till you're done.
I'm going to play devil's advocate and say, Yes. TDD and Agile are the same thing, just at different scales.
Bear with me, here.
First off, TDD encourages you to have a plan of what you want to achieve, before you achieve it. You don't think about how you're going to achieve it. You just think about how to demonstrate that the thing you're about to write is valuable, and you work out how you know. This is very similar to the way in which projects are ideally sourced and requirements are gathered in Agile methodologies.
Then, you do the minimum necessary to get feedback on the work. With TDD this means a red or green bar. At a higher level, Agile methodologies encourage you to showcase and get feedback from stakeholders, or (preferably) release to production and see if it works and if anyone uses it.
Then you work out what the next bit of work to do is, and you write the next bit of the plan.
Agile methodologies may also use estimation and prioritisation, but these are mostly to do with assigning budgets and working out whether the work is worth doing in the first place - which devs do naturally at a small scale.
Agile methodologies are iterative - that is, the periods of planning, implementation, delivery and feedback are cyclical. So is TDD, with exactly the same steps.
Agile methodologies usually emphasise communication, conversation and lightweight documentation. TDD can be used as a form of documentation, too, especially if you make the test-names into meaningful sentences and use the same language that the business use together with realistic examples. This can also encourage communication and conversation.
Agile methodologies encourage reflection and learning from the past. TDD has this lovely red bar which can help you to do that very quickly.
If you scale TDD up, you get Acceptance Tests or BDD-style scenarios. Further up you start getting into Feature Injection and other forms of vision-driven analysis. Further up still you're looking at whether the released project retains your market share, or provides the options you wanted going forward, or achieves whatever its original vision was. The tests get bigger, but the process of writing just enough, getting feedback on it and learning continuously is still the same, no matter what the Agile methodology is.
All the rules which help Agile to be successful at a large scale can be applied to TDD at a small scale, and vice versa. (I'm trying hard to think of any exceptions to that and can't).
So, no. Agile isn't different to TDD. It's just TDD-done-bigger.