<blockquote>
<p>Unit testing is, roughly speaking, testing bits of your code in isolation with test code. The immediate advantages that come to mind are:</p>
<ul>
<li>Running the tests becomes automate-able and repeatable</li>
<li>You can test at a much more granular level than point-and-click testing via a GUI</li>
</ul>
<p><a href="https://stackoverflow.com/questions/1383/what-is-unit-testing">Rytmis</a></p>
</blockquote>
<p>My question is, what are the current &quot;best practices&quot; in terms of tools as well as when and where to use unit testing as part of your daily coding?</p>
<p>Lets try to be somewhat language agnostic and cover all the bases.</p>

The xUnit family are the mainstay of unit testing. They are integrated into the likes of Netbeans, Eclipse and many other IDEs. They offer a simple, structured solution to unit testing.
One thing I always try and do when writing a test is to minimise external code usage. By that I mean: I try to minimise the setup and teardown code for the test as much as possible and try to avoid using other modules/code blocks as much as possible. Well-written modular code shouldn't require too much external code in it's setup and teardown.