There are simple concepts about the test first process. You have to write a test that fails, write code to make the test pass and then refactor your code. Keep the bar green to keep the code clean, remember this.
Repeat this cycle until you don’t have anything else to test for a specific feature.
Looking at a User Story and its acceptance tests, you also have to make sure you are adding business value on every test.
Well, you have to practice.
I’m not kidding.
By the way, don’t leave technical debt behind.
Just for information, currently I manage teams developing in Java (Web), Java (Mobile) and Delphi (Desktop/WebBroker).
And also looking at test automation, both Delphi and Java Web apps will use Selenium to help on automation of web processes.
Well, you can wait more articles on each of those tools and relation to Agile Development and eXtreme Programming practices.
So, remember: you are build tests for prevention of defects. With this you are also building tests to do regression testing.
Keep quality high, always.